Description Details Author(s) Examples
Provide functions for compact and robust handling of categorical information using R. The core of the package are functions that allows storing a factor with several 'translations' of its levels and to pick which should be used.
The DESCRIPTION file:
This package was not yet installed at build time.
Index: This package was not yet installed at build time.
Thomas Fabbro
Maintainer: Thomas Fabbro <thomas.fabbro@unibas.ch>
1 2 3 4 5 6 7 8 9 10 11 12 13 | f <- c("a", "b", "c", "a", "a")
l <- data.frame(orig = c("a", "b", "c", "d"),
lang1 = c("A", "B", "C", "D"),
lang2 = c("first", "second", "third", "last"),
order1 = c(5, 3, 4, 2),
order2 = c("z", "y", "x", "w"),
group1 =c("A", "B", "B", "B")
)
sf <- fctr(f, l)
use(sf, "lang2")
use(sf, "lang2", reorder = "order1")
use(sf, "lang2", drop = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.