Description Usage Arguments Details Examples
make two factors have the same levels
1  | harmonize.levels(fac1, fac2)
 | 
fac1 | 
 the first factor  | 
fac2 | 
 the second factor  | 
given two factors, where the second factor has the same levels as the
first, or where the second factor's levels are a superset of the
first's, return a new factor to replace the first one whose levels
are the same as the second's.
so if we have
fac1 <- c("old", "young", "old") # levels are c("old", "young")
fac2 <- c("young", "old", "infant") # levels are c("infant", "young", "old")
then
res <- harmonize.levels(fac1, fac2)
will return a factor
c("old", "young", "old") whose levels are
c("infant", "young", "old")
1 2 3 4  | ## Not run: 
   ## TODO add examples
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.