convert_table: Convert types of data in a table

Description Usage Arguments Author(s) Examples

View source: R/convert_table.R

Description

Convert every element in a matrix or dataframe to another type (eg. integer -> character)

Usage

1
convert_table(dat, function_new_type)

Arguments

dat

A matrix or dataframe

function_new_type

The transformation function that converts the type of an object to another (eg. as.character())

Author(s)

Peter I-Fan Wu

Examples

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)

peterwu19881230/microbialPhenotypes documentation built on March 19, 2021, 6:36 a.m.