Skip to content

Commit 80c7251

Browse files
committed
Consistent format sections for datasets
1 parent 8ef6862 commit 80c7251

File tree

6 files changed

+154
-154
lines changed

6 files changed

+154
-154
lines changed

R/data.R

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
#' diamonds. The variables are as follows:
55
#'
66
#' @format A data frame with 53940 rows and 10 variables:
7-
#' \itemize{
8-
#' \item price: price in US dollars (\$326--\$18,823)
9-
#' \item carat: weight of the diamond (0.2--5.01)
10-
#' \item cut: quality of the cut (Fair, Good, Very Good, Premium, Ideal)
11-
#' \item color: diamond colour, from J (worst) to D (best)
12-
#' \item clarity: a measurement of how clear the diamond is
13-
#' (I1 (worst), SI1, SI2, VS1, VS2, VVS1, VVS2, IF (best))
14-
#' \item x: length in mm (0--10.74)
15-
#' \item y: width in mm (0--58.9)
16-
#' \item z: depth in mm (0--31.8)
17-
#' \item depth: total depth percentage = z / mean(x, y) = 2 * z / (x + y) (43--79)
18-
#' \item table: width of top of diamond relative to widest point (43--95)
7+
#' \describe{
8+
#' \item{price}{price in US dollars (\$326--\$18,823)}
9+
#' \item{carat}{weight of the diamond (0.2--5.01)}
10+
#' \item{cut}{quality of the cut (Fair, Good, Very Good, Premium, Ideal)}
11+
#' \item{color}{diamond colour, from J (worst) to D (best)}
12+
#' \item{clarity}{a measurement of how clear the diamond is (I1 (worst), SI1,
13+
#' SI2, VS1, VS2, VVS1, VVS2, IF (best))}
14+
#' \item{x}{length in mm (0--10.74)}
15+
#' \item{y}{width in mm (0--58.9)}
16+
#' \item{z}{depth in mm (0--31.8)}
17+
#' \item{depth}{total depth percentage = z / mean(x, y) = 2 * z / (x + y) (43--79)}
18+
#' \item{table}{width of top of diamond relative to widest point (43--95)}
1919
#' }
2020
"diamonds"
2121

@@ -27,18 +27,18 @@
2727
#' format, \code{economics_long} is in "long" format.
2828
#'
2929
#' @format A data frame with 478 rows and 6 variables
30-
#' \itemize{
31-
#' \item date. Month of data collection
32-
#' \item psavert, personal savings rate,
33-
#' \url{http://research.stlouisfed.org/fred2/series/PSAVERT/}
34-
#' \item pce, personal consumption expenditures, in billions of dollars,
35-
#' \url{http://research.stlouisfed.org/fred2/series/PCE}
36-
#' \item unemploy, number of unemployed in thousands,
37-
#' \url{http://research.stlouisfed.org/fred2/series/UNEMPLOY}
38-
#' \item uempmed, median duration of unemployment, in week,
39-
#' \url{http://research.stlouisfed.org/fred2/series/UEMPMED}
40-
#' \item pop, total population, in thousands,
41-
#' \url{http://research.stlouisfed.org/fred2/series/POP}
30+
#' \describe{
31+
#' \item{date}{Month of data collection}
32+
#' \item{psavert}{personal savings rate,
33+
#' \url{http://research.stlouisfed.org/fred2/series/PSAVERT/}}
34+
#' \item{pce}{personal consumption expenditures, in billions of dollars,
35+
#' \url{http://research.stlouisfed.org/fred2/series/PCE}}
36+
#' \item{unemploy}{number of unemployed in thousands,
37+
#' \url{http://research.stlouisfed.org/fred2/series/UNEMPLOY}}
38+
#' \item{uempmed}{median duration of unemployment, in weeks,
39+
#' \url{http://research.stlouisfed.org/fred2/series/UEMPMED}}
40+
#' \item{pop}{total population, in thousands,
41+
#' \url{http://research.stlouisfed.org/fred2/series/POP}}
4242
#' }
4343
#'
4444
"economics"
@@ -51,35 +51,35 @@
5151
#' Demographic information of midwest counties
5252
#'
5353
#' @format A data frame with 437 rows and 28 variables
54-
#' \itemize{
55-
#' \item PID
56-
#' \item county
57-
#' \item state
58-
#' \item area
59-
#' \item poptotal. Total population
60-
#' \item popdensity. Population density
61-
#' \item popwhite. Number of whites.
62-
#' \item popblack. Number of blacks.
63-
#' \item popamerindian. Number of American Indians.
64-
#' \item popasian. Number of Asians.
65-
#' \item popother. Number of other races.
66-
#' \item percwhite. Percent white.
67-
#' \item percblack. Percent black.
68-
#' \item percamerindan. Percent American Indian.
69-
#' \item percasian. Percent Asian.
70-
#' \item percother. Percent other races.
71-
#' \item popadults. Number of adults.
72-
#' \item perchsd.
73-
#' \item percollege. Percent college educated.
74-
#' \item percprof. Percent profession.
75-
#' \item poppovertyknown.
76-
#' \item percpovertyknown
77-
#' \item percbelowpoverty
78-
#' \item percchildbelowpovert
79-
#' \item percadultpoverty
80-
#' \item percelderlypoverty
81-
#' \item inmetro. In a metro area.
82-
#' \item category'
54+
#' \describe{
55+
#' \item{PID}{}
56+
#' \item{county}{}
57+
#' \item{state}{}
58+
#' \item{area}{}
59+
#' \item{poptotal}{Total population}
60+
#' \item{popdensity}{Population density}
61+
#' \item{popwhite}{Number of whites.}
62+
#' \item{popblack}{Number of blacks.}
63+
#' \item{popamerindian}{Number of American Indians.}
64+
#' \item{popasian}{Number of Asians.}
65+
#' \item{popother}{Number of other races.}
66+
#' \item{percwhite}{Percent white.}
67+
#' \item{percblack}{Percent black.}
68+
#' \item{percamerindan}{Percent American Indian.}
69+
#' \item{percasian}{Percent Asian.}
70+
#' \item{percother}{Percent other races.}
71+
#' \item{popadults}{Number of adults.}
72+
#' \item{perchsd}{}
73+
#' \item{percollege}{Percent college educated.}
74+
#' \item{percprof}{Percent profession.}
75+
#' \item{poppovertyknown}{}
76+
#' \item{percpovertyknown}{}
77+
#' \item{percbelowpoverty}{}
78+
#' \item{percchildbelowpovert}{}
79+
#' \item{percadultpoverty}{}
80+
#' \item{percelderlypoverty}{}
81+
#' \item{inmetro}{In a metro area.}
82+
#' \item{category}{}
8383
#' }
8484
#'
8585
"midwest"
@@ -93,18 +93,18 @@
9393
#' proxy for the popularity of the car.
9494
#'
9595
#' @format A data frame with 234 rows and 11 variables
96-
#' \itemize{
97-
#' \item manufacturer.
98-
#' \item model.
99-
#' \item displ. engine displacement, in litres
100-
#' \item year.
101-
#' \item cyl. number of cylinders
102-
#' \item trans. type of transmission
103-
#' \item drv. f = front-wheel drive, r = rear wheel drive, 4 = 4wd
104-
#' \item cty. city miles per gallon
105-
#' \item hwy. highway miles per gallon
106-
#' \item fl.
107-
#' \item class.
96+
#' \describe{
97+
#' \item{manufacturer}{}
98+
#' \item{model}{model name}
99+
#' \item{displ}{engine displacement, in litres}
100+
#' \item{year}{year of manufacture}
101+
#' \item{cyl}{number of cylinders}
102+
#' \item{trans}{type of transmission}
103+
#' \item{drv}{f = front-wheel drive, r = rear wheel drive, 4 = 4wd}
104+
#' \item{cty}{city miles per gallon}
105+
#' \item{hwy}{highway miles per gallon}
106+
#' \item{fl}{fuel type}
107+
#' \item{class}{"type" of car}
108108
#' }
109109
"mpg"
110110

@@ -120,18 +120,18 @@
120120
#' wikipedia.
121121
#'
122122
#' @format A data frame with 83 rows and 11 variables
123-
#' \itemize{
124-
#' \item name. common name
125-
#' \item genus.
126-
#' \item vore. carnivore, omnivore or herbivore?
127-
#' \item order.
128-
#' \item conservation. the conservation status of the animal
129-
#' \item sleep\_total. total amount of sleep, in hours
130-
#' \item sleep\_rem. rem sleep, in hours
131-
#' \item sleep\_cycle. length of sleep cycle, in hours
132-
#' \item awake. amount of time spent awake, in hours
133-
#' \item brainwt. brain weight in kilograms
134-
#' \item bodywt. body weight in kilograms
123+
#' \describe{
124+
#' \item{name}{common name}
125+
#' \item{genus}{}
126+
#' \item{vore}{carnivore, omnivore or herbivore?}
127+
#' \item{order}{}
128+
#' \item{conservation}{the conservation status of the animal}
129+
#' \item{sleep_total}{total amount of sleep, in hours}
130+
#' \item{sleep_rem}{rem sleep, in hours}
131+
#' \item{sleep_cycle}{length of sleep cycle, in hours}
132+
#' \item{awake}{amount of time spent awake, in hours}
133+
#' \item{brainwt}{brain weight in kilograms}
134+
#' \item{bodywt}{body weight in kilograms}
135135
#' }
136136
"msleep"
137137

man/diamonds.Rd

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/economics.Rd

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/midwest.Rd

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mpg.Rd

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/msleep.Rd

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)