Factor,Dataframe,Array
an anonymous user
·
R
·

v=c("Spring","Autum","Winter","Summer","Spring","Autum") print(factor(v)) # levels is categorize nlevels(factor(v)) # Arrays array(c(1,2,3),dim=c(3,3,3)) # here in dim(dimension), (3,3,3) 1st - row,2nd-column,3rd- 3 matrix array(c(1,2,3),dim=c(3,2,3)) array(c(1,2,3),dim=c(3,3)) array(c(1,2,3),dim=c(3,2)) array(c(1,2,3,4,5,6,7,8,9),dim=c(3,3)) array(c(1,2,3,4,5,6),dim=c(3,2)) s=c(“cricket”,’football’,”kabaddi”,”tennis”,”hockey ) fan=c(90,75,66,50,68) data.frame(s,fan)
Click on the Run button to get started.
The code/input has changed since you last clicked on Run. Click it
again to see the updated changes.
Comments