Description Usage Arguments Details Value Author(s) See Also Examples
Descide which translation (and ordering) of a factor to use in a particular situation.
1 2 |
x |
A factor that was prepared by the function 'fctr'. |
lang |
A character string indicating which set of levels to be used. |
reorder |
A character string indicating the name of the set of levels to be used for ordering the levels. |
drop |
A logical, indicating if unused levels should be dropped. |
... |
Further arguments are perhaps needed in the future. |
FIXME: to follow
An object of class fctr (that contains the class factor) and can be used as a standard factor.
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, "lang1")
use(sf, "lang2")
use(sf, "lang2", reorder = "order1")
use(sf, "lang1", drop = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.