#Create a vector apple<-c('red','green','yellow') print(apple) #get class of vector print(class(apple)) #create a lsit list1<-list(c(2,3,5),21.3,sin) print(list1) #create a matrix M<-matrix(c('1','5','2','4','3','6'),nrow=2,ncol=3,byrow=FALSE) print(M) #Create an array a<-array(c('green','yellow'),dim=c(3,3,2)) print(a) #Create a factor apple_colors<-c('Green','Green','Yellow','red','red','Green') #Create a factor object factor_apple<-factor(apple_colors) #print the factor print(factor_apple) #create a dataframe BMI<-data.frame( gender=c("Male","Male","Female"), height=c(152,171.5,165), weight=c(81,93,78), Age=c(42,38,26) ) print(BMI) #Create a sequence from 5 to 13 v<-5:13 print(v) #Create a sequence from 6.6 to 12.6 v<-6.6:12.6 print(v)