Description Usage Arguments Value Examples
Change variable type
changeType change variable type across list of data frame
1 | changeType(x, Var, funct = "as.Date")
|
x |
list of data frames |
Var |
variables or column names |
funct |
function to change variable type such as.factor(), as.Date(), as.factor(), etc |
list of data frames with changed variable type
1 2 3 4 5 6 7 8 | # make a list
iris_list <- list(iris1 = iris, iris2 = iris)
# change one variable type
iris_list <- lapply(iris_list, changeType, Var = "Sepal.Width", funct = "as.character")
# change 2 variables type
iris_list <- lapply(iris_list, changeType, Var = c("Sepal.Length", "Species"), funct = "as.character")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.