Learn R Programming

RAM (version 1.2.1.3)

reset.META: Reset OTU

Description

This function reset data type of metadata variables.

Usage

reset.META(meta, factor=NULL, numeric=NULL, date=NULL)

Arguments

meta
data frame. The metadata table to reset variable data type.
factor
a string or charactor vector, containing the column names of metadata variables to be set as factor.
numeric
a string or charactor vector, containing the column names of metadata variables to be set as numeric.
date
a string or charactor vector containing the column names of metadata variables to be set as date.

Value

This function returns the same metadata with variables being reset to desired data type. Warnings or errors may be raise if the format of the original data cannot be recognized by R.

Examples

Run this code
data(meta)
str(meta)
## Not run: 
# # for demonstration purpose only
# meta.new <- reset.META(meta, factor=c("Plots"),
#                    numeric=c("City", "Province"))
# str(meta.new)
# ## End(Not run)

Run the code above in your browser using DataLab