Description Usage Arguments Details Value
Convert a character vector to a call of the desired class
1 |
x |
a character string (e.g., of column names in a data.table) |
type |
the class resulting from the evaluation of the call returned by s2c |
e.g., convert c("column1","column2")
to list(column1, column2)
intended for use in a data.table (see data.table
)
a list
@examples library(data.table) first <- data.table(cray=sample(letters,4),"one"=c(1,2,3,4), "two"=c(1,3,5,7)) second <- data.table("cray"=sample(letters,35, TRUE)) oc <- CJ(one=first[,(one)], cray=second[[1]]) sub <- s2c(c("one","cray")) oc[,eval(sub)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.