drop_frame_lab {labelr} | R Documentation |
Remove Frame Label Attribute from a Data Frame
Description
Remove the frame label attribute (see add_frame_lab
) from a data.frame, if
one is present.
Usage
drop_frame_lab(data)
dfl(data)
Arguments
data |
the data.frame with a frame label that you wish to drop (and which
was added using |
Details
See add_frame_lab
for more on this labeling construct.
Note: dfl
is a compact alias for drop_frame_lab
: they do the same thing,
and the former is easier to type.
Value
a data.frame (with any previously applied frame.lab attribute removed).
Examples
# add frame.lab to mtcars and assign to new data.frame mt2
mt2 <- add_frame_lab(mtcars, frame.lab = "Data extracted from the 1974 Motor
Trend US magazine, comprising fuel consumption and 10
aspects of automobile design and performance for 32
automobiles (1973–74 models). Source: Henderson and
Velleman (1981), Building multiple regression models
interactively. Biometrics, 37, 391–411.")
get_frame_lab(mt2) # return frame.lab alongside data.frame name as a data.frame
drop_frame_lab(mt2) # remove this frame.lab
get_frame_lab(mt2) # the data.frame name now doubles as its frame label
is.null(attributes(data)[["frame.lab"]]) # the attribute is NULL
[Package labelr version 0.1.7 Index]