add_frame_lab {labelr} | R Documentation |
Add or Modify a Data Frame "Frame Label"
Description
Add a 500-or-fewer-characters high-level descriptive label for your data.frame as whole (e.g., nature, originator, population / sample, year created, general contents, article citation).
Usage
add_frame_lab(data, frame.lab = NULL)
afl(data, frame.lab = NULL)
Arguments
data |
a data.frame. |
frame.lab |
quoted text of the descriptive data.frame label that you wish to add to the data.frame. |
Details
add_frame_lab
assigns an overall descriptive "frame label" for a data.frame,
which can be retrieved using get_frame_lab.
Note: afl
is a compact alias for add_frame_lab
: they do the same thing,
and the former is easier to type
Value
A data.frame, with a frame.lab attribute added to the attributes meta-data
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.")
attr(mt2, "frame.lab") # check for attribute
get_frame_lab(mt2) # return frame.lab alongside data.frame name as a data.frame
[Package labelr version 0.1.7 Index]