ec.Labels: DataFrame Tools : (Re)Set labels

Description Usage Arguments Details Value Author(s) Examples

Description

Set or reset labels for one or more columns

Usage

1
ec.Labels(x, to = "", labels = list())

Arguments

x

- a string or a list of string of column(s) name(s)

to

- a string, column name when a range of contiguous columns is used (range x - to)

labels

- a vector of "current value"="new value" see examples

Details

TODO

Value

TRUE. GDS the Global DataSet is modified

Author(s)

jp.decorps@epiconcept.fr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(Epiconcepts)
# -----------------------------------------------------------
# Set labels of a column
# -----------------------------------------------------------
data(mtcars)
ec.Use(mtcars)
ec.Labels("am", labels=c("0"="No", "1"="Yes"))

# -----------------------------------------------------------
# Set labels for a list of columns
# -----------------------------------------------------------
data(mtcars)
ec.Use(mtcars)
ec.Labels(list("vs","am"), labels=c("0"="No", "1"="Yes"))

# -----------------------------------------------------------
# Set labels for a range of contiguous columns
# -----------------------------------------------------------
data(mtcars)
ec.Use(mtcars)
ec.Labels("vs", to="am", labels=c("0"="No", "1"="Yes"))

Epiconcept-Paris/Epiconcepts documentation built on May 6, 2019, 3:49 p.m.