rk.get.label {rkward}R Documentation

Various label related utility functions

Usage

rk.get.label(x)
rk.set.label(x, label, envir = parent.frame())
rk.get.short.name(x)
rk.get.description(..., paste.sep = NULL, is.substitute = FALSE)
rk.list.names(..., deparse.level = 2)
rk.list(...)

Arguments

x any R object
label a string, to set the label attribute of an object
envir an environment, where the attribute is evaluated
paste.sep a string, used as the collapse argument for paste
is.substitute a logical (not NA). See Details.

Details

rk.get.label retrieves the rkward label (if any) of the given object.

rk.set.label sets the rkward label for the given object.

rk.get.short.name creates a short name for the given object.

rk.get.description creates descriptive string(s) for each of the arguments in "..."; collapsing into a single string using paste.sep (if not NULL). If is.substitute=TRUE, the arguments will be deparsed, first, which can be useful when using rk.get.description inside a function.

rk.list.names returns the names of the arguments passed as ...; when using rk.list.names inside a function, it may be necessary to increase the deparse.level level.

rk.list returns a list of its arguments, with names set as returned by rk.get.description(). This can be used as a drop-in replacement for list.

Value

rk.set.label returns the result of the evaluation of "setting the label" while the others return a character vector.

Author(s)

Thomas Friedrichsmeier rkward-devel@lists.sourceforge.net

Examples

x <- data.frame(a=c(1:3), b=c(2:4))
rk.set.label(x[["a"]], "First column")
rk.get.short.name (x$a)                   # "x$a"
rk.get.label (x$a)                        # "First column"
rk.get.description (x$a)                  # "x$a (First column)"
rk.list.names (x, x$a, x$b)               # "x" "x$a" "x$b"
names (rk.list (x$a, x$b))                # "x$a (First column)" "x$b"

[Package rkward version 0.5.6 Index]