@Spacedman는 이런 종류의 좋은 일반적인 대답이있다.
좀 더 애호가가 있다면 comment()
을 사용해보세요. Hmisc
패키지의에서
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()
는 data.frames에서 개별 열을 문서화하는 메커니즘을 제공합니다. contents()
은 동일한 패키지에서 data.frame에 첨부 한 속성 중 하나를 요약합니다.
여기 제공된 답변을 참조하여 data.frames도 똑같이 작동해야합니다. http://stackoverflow.com/questions/6324568/function-commenting-conventions-in-r/ 6324618 # 6324618 – Chase