# 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
Run the code above in your browser using DataLab