dftomat | R Documentation |
Converts selected columns of data.frame
to a matrix
dftomat(obj, cols)
obj |
|
cols |
|
A matrix
thedf <- data.frame(ID=rep(c('A', 'B'), length.out=10), A=sample(10), B=rnorm(10), C=sample(10))
dftomat(thedf, cols=c('A'))
dftomat(thedf, cols=c('A', 'B'))
dftomat(thedf, cols=c('A', 'B', 'C'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.