All technological notes.
vector:
components of the vector:
Function to check the type of vector:
typeof()Classifications:
Atomic vectors: all the elements are of the same type
Numeric vector: contains numeric elementsInteger vector: contains integer elementsCharacter vector: contains character elementsLogical vector: contains Boolean valuesLists: the elements are of different data types.# c() function
x<-c(10.1, 10.2, 33.2)
# 10.1 10.2 33.2
class(x)
# "numeric"
x<-c("shubham","arpita","nishka","vaishali")
class(x)
# "character"
# colon(:) operator
x<-1:10
# 1 2 3 4 5 6 7 8 9 10
x<-10:1
# 10 9 8 7 6 5 4 3 2 1
# seq() function
x<-seq(1,4,by=0.5)
# 1.0 1.5 2.0 2.5 3.0 3.5 4.0
class(x) # "numeric"