Social Media Research

02 R Data Analysis


Question

name<- c("Lilly", "Benedict", "Daniela")
age <- c(15,16,17)

add the vector of names to the age, as a second column.


Answer
> cbind(age,name)
     age  name      
[1,] "15" "Lilly"   
[2,] "16" "Benedict"
[3,] "17" "Daniela" 



Comments