Description Usage Arguments Value Examples
View source: R/sampleData-class.R
This is used internally by the builder method, sample_data
, to
ensure that the factors describing categorical variables in a data.frame or
sample_data object are free of extra levels that can plague downstream plots
analysis.
1 | reconcile_categories(DFSM)
|
DFSM |
(Required). A |
A single data.frame
object. Even if the input argument is a sample_data
,
the return is a data.frame
. Because this is intended to be used internally by
the builder method, it cannot also call the builder function to re-build
the cleaned sample_data
.
1 2 3 4 5 6 7 8 | # # # data(GlobalPatterns)
# # # SM <- sample_data(GlobalPatterns)
# # # DF <- data.frame(SM)
# # # DF <- data.frame(DF, col1=1:nrow(DF), col2=paste(1:nrow(DF), "t", sep=""))
# # # DF <- reconcile_categories(DF)
# # # SM <- sample_data(reconcile_categories(SM))
# # # sapply(DF, class)
# # # sapply(SM, class)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.