test for data type
is.numeric(), is.character(), is.vector(), is.matrix(), is.data.frame()
convert it
as.numeric(), as.character(), as.vector(), as.matrix(), as.data.frame)
vector/matrix/data.frame
| to one long | to | to |
from | c(x,y) | cbind(x,y) rbind(x,y) | data.frame(x,y) |
from | as.vector(mymatrix) | | as.data.frame(mymatrix) |
from | | as.matrix(myframe) | |