labels

0th

Percentile

Retrieve or modify the row or column labels.

These functions allow the row or column labels of a tabular object to be retrieved or modified.

Usage
rowLabels(x)
rowLabels(x) <- value
colLabels(x)
colLabels(x) <- value
# S3 method for tabularRowLabels
[(x, i, j, ..., drop = FALSE)
# S3 method for tabularColLabels
[(x, i, j, ..., drop = FALSE)
Arguments
x

A "tabular", "tabularRowLabels" or "tabularColLabels" object.

value

A replacement

i, j, ..., drop

Arguments used for subsetting the labels. See Details below.

Details

Subsetting the row labels does not allow the number of rows to be changed; likewise, subsetting the column labels does not allow the number of columns to be changed. To change both, subset the original "tabular" object.

Value

rowLabels and the corresponding subsetting method return an object of class "tabularRowLabels".

colLabels and the corresponding subsetting method return an object of class "tabularColLabels".

The assignment functions return "tabular" objects.

See Also

[.tabular

Aliases
  • rowLabels
  • rowLabels<-
  • colLabels
  • colLabels<-
  • [.tabularColLabels
  • [.tabularRowLabels
Examples
# NOT RUN {
tab <- tabular( (Species + 1) ~ (n=1) + Format(digits=2)*
         (Sepal.Length + Sepal.Width)*(mean + sd), data=iris )
colLabels(tab)
colLabels(tab) <- colLabels(tab)[1,]
tab
# }
Documentation reproduced from package tables, version 0.8.8, License: GPL-2

Community examples

Looks like there are no examples yet.