Introduction to R (Part 2) Data types in R
#########DATA TYPES########## #mainly six (6) types #Type 1: Vector ##Six types of vector:logical(T/F),numeric, integer, complex, charater a=TRUE #logical b=FALSE #logical c=20.5 #numeric d=7L #integer #L to mention integer e=10+5L #comples f=”Research HUB” #charater vec= c(1,4,3,7,90,30,40) #to create a vector vec vec2=c(“hello”, “sorry”, “buzinga”) vec2 sortvec=sort(vec) #sorted from small to large sortvec sortvec2=sort(vec2) #sorted alphabatically sortvec2 vec[4] #gives the vaue in
Continue reading
Recent Comments