fctr-package: Factors with multiple lables

Description Details Author(s) Examples

Description

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.

Details

The DESCRIPTION file: This package was not yet installed at build time.

Index: This package was not yet installed at build time.

Author(s)

Thomas Fabbro

Maintainer: Thomas Fabbro <thomas.fabbro@unibas.ch>

Examples

 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)

thofab/fctr documentation built on Nov. 5, 2019, 10:07 a.m.