@ У Spacedman есть хороший общий ответ для такого рода вещей.
Если вы хотите что-то более изумительное, вы можете попробовать comment()
.
comment(iris) <-
" This famous (Fisher's or Anderson's) iris data set gives the
measurements in centimeters of the variables sepal length and
width and petal length and width, respectively, for 50 flowers
from each of 3 species of iris. The species are _Iris setosa_,
_versicolor_, and _virginica_.\n"
cat(comment(iris))
# This famous (Fisher's or Anderson's) iris data set gives the
# measurements in centimeters of the variables sepal length and
# width and petal length and width, respectively, for 50 flowers
# from each of 3 species of iris. The species are _Iris setosa_,
# _versicolor_, and _virginica_.
label()
и units()
из пакета Hmisc
предоставляют механизмы для документирования отдельных столбцов в data.frames.contents()
, в том же пакете суммируется любой из этих атрибутов, которые вы прикрепили к data.frame.