
107
• nasaweather
(
https://github.com/hadley/nasaweather
)
• nycflights13
(
https://github.com/hadley/nycflights13
)
• usdanutrients
(
https://github.com/hadley/usdanutrients
)
9.1.1
ーットのドメント
data/
内のオブジェクトは常にエクスポートされます(とは少し異なる機構を使ってい
ますが、詳細はあまり重要ではありません)。つまり、データのドキュメントが必要になるという
ことです。データのドキュメントは関数のドキュメントと同様ですが、いくつかわずかな違いがあ
ります。データのドキュメントを直接作るのではなく、データセットの名前に対してドキュメント
を作成します。例えば、
ggplot2
の
diamonds
データセットのドキュメントを作成するのに使った
roxygen2
のブロックは次のようになります。
#' Prices of 50,000 round cut diamonds
#'
#' A dataset containing the prices and other
#' attributes of almost 54,000 diamonds
#'
#' @format A data frame with 53940 rows and 10 variables:
#' \describe{ ...