- R Data Visualization Cookbook
- Atmajitsinh Gohil
- 137字
- 2021-08-06 19:21:05
Data types in R
Everything in R is in the form of objects. Objects can be manipulated in R. Some of the common objects in R are numeric vectors, character vectors, complex vectors, logical vectors, and integer vectors.

How to do it…
In order to generate a numeric vector in R, we can use the C()
notation to specify it as follows:
x = c(1:5) # Numeric Vector
To generate a character vector, we can specify the same within quotes (" ") as follows:
y ="I am Home" # Character Vector
To generate a complex vector, we can use the i
notation as follows:
c = c(1+3i) #complex vector
A list is a combination of a character and a numeric vector and can be specified using the list()
notation:
z = list(c(1:5),"I am Home") # List
推薦閱讀
- Drupal 8 Blueprints
- Apache Spark 2.x for Java Developers
- Jenkins Continuous Integration Cookbook(Second Edition)
- Android系統(tǒng)原理及開發(fā)要點(diǎn)詳解
- Java EE核心技術(shù)與應(yīng)用
- Learning AWS
- Building Business Websites with Squarespace 7(Second Edition)
- Python全棧開發(fā):基礎(chǔ)入門
- 視窗軟件設(shè)計(jì)和開發(fā)自動(dòng)化:可視化D++語言
- Learning Shiny
- 計(jì)算機(jī)軟件項(xiàng)目實(shí)訓(xùn)指導(dǎo)
- Spring MVC Blueprints
- Tkinter GUI Application Development Blueprints
- Scratch編程入門與算法進(jìn)階(第2版)
- Advanced C++