relabel: Reassigning values of categorical variable

Description Usage Arguments Value See Also Examples

View source: R/relabel.R

Description

Reassigning values of categorical variable. It is used for generating legal value of categorical variable before applying dynamic slicing.

Usage

1
  relabel(x)

Arguments

x

A vector of data values.

Value

An integer vector with values range from 0 to k (k > 0).

See Also

ds_test.

Examples

1
2
3
4
5
6
n <- 10
x <- c(rep("G1", n), rep("G2", n))
x <- relabel(x)

x <- c(rep(4, n), rep(5, n), rep(NA, n))
x <- relabel(x)

dslice documentation built on May 19, 2017, 6:28 p.m.

Search within the dslice package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.