Description Usage Arguments Author(s) Examples
View source: R/convert_table.R
Convert every element in a matrix or dataframe to another type (eg. integer -> character)
1 | convert_table(dat, function_new_type)
|
dat |
A matrix or dataframe |
function_new_type |
The transformation function that converts the type of an object to another (eg. as.character()) |
Peter I-Fan Wu
1 2 3 4 | dat=data.frame(number=1:5,letter=letters[1:5])
str(dat)
new_dat=convert_table(dat, as.character)
str(new_dat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.