Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

keep.labels

Keep Labels


Description

Keep the 'label' attribute on an R object when subsetting. loosen.labels allows the 'label' attribute to be lost again.

Usage

keep.labels(x, ...)

## S3 method for class 'data.frame'
keep.labels(x, ...)

## Default S3 method:
keep.labels(x, ...)

## S3 method for class 'keep_labels'
x[...]

## S3 replacement method for class 'keep_labels'
x[i] <- value

loosen.labels(x, ...)

## S3 method for class 'data.frame'
loosen.labels(x, ...)

## Default S3 method:
loosen.labels(x, ...)

Arguments

x

An R object

...

Other arguments (not in use at this time).

i, value

See [<-.

Value

A copy of x with a "keep_labels" class appended on or removed. Note that for the data.frame method, only classes on the columns are changed; the data.frame won't have an extra class appended. This is different from previous versions of arsenal.

Author(s)

Ethan Heinzen

See Also


arsenal

An Arsenal of 'R' Functions for Large-Scale Statistical Summaries

v3.6.2
GPL (>= 2)
Authors
Ethan Heinzen [aut, cre], Jason Sinnwell [aut], Elizabeth Atkinson [aut], Tina Gunderson [aut], Gregory Dougherty [aut], Patrick Votruba [ctb], Ryan Lennon [ctb], Andrew Hanson [ctb], Krista Goergen [ctb], Emily Lundt [ctb], Brendan Broderick [ctb], Maddie McCullough [art]
Initial release
2021-02-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.