Skip to content

Commit df46511

Browse files
committed
Roll the autompg dataset
1 parent a3cf3d7 commit df46511

File tree

5 files changed

+76
-1
lines changed

5 files changed

+76
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ucidata
22
Title: Collection of Datasets from the UCI Irving Machine Learning Repository
3-
Version: 0.0.1
3+
Version: 0.0.2
44
Authors@R: person("James", "Balamuta", email = "[email protected]", role = c("aut", "cre"))
55
Description: Varying datasets from the UCI Irving Machine Learning Repository
66
Depends: R (>= 3.4.1)

R/pkg_datasets.R

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,28 @@
3131
#' <https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.names>
3232
#' <https://archive.ics.uci.edu/ml/datasets/wine>
3333
"wine"
34+
35+
36+
#' Autompg Data Set
37+
#'
38+
#' This dataset is a slightly modified version of the dataset provided in
39+
#' the StatLib library. In line with the use by Ross Quinlan (1993) in
40+
#' predicting the attribute "mpg", 8 of the original instances were removed
41+
#' because they had unknown values for the "mpg" attribute.
42+
#' @format A data frame with 6497 observations (1599 Red and 4898 White) on the following 12 variables.
43+
#' - `mpg`: continuous
44+
#' - `cylinders`: multi-valued discrete
45+
#' - `displacement`: continuous
46+
#' - `horsepower`: continuous
47+
#' - `weight`: continuous
48+
#' - `acceleration`: continuous
49+
#' - `model_year`: multi-valued discrete
50+
#' - `origin`: multi-valued discrete
51+
#' - `car_name`: string (unique for each instance)
52+
#' @source This dataset was taken from the StatLib library which is
53+
#' maintained at Carnegie Mellon University. The dataset was
54+
#' used in the 1983 American Statistical Association Exposition.
55+
#' @references
56+
#' <https://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.names>
57+
#' <https://archive.ics.uci.edu/ml/datasets/auto+mpg>
58+
"autompg"

data-raw/autompg_build.R

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### UCI Irving
2+
## autompg Data https://archive.ics.uci.edu/ml/datasets/auto+mpg
3+
4+
autompg = read.table(
5+
"http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data",
6+
quote = "\"",
7+
comment.char = "",
8+
stringsAsFactors = FALSE)
9+
10+
colnames(autompg) = c("mpg", "cylinders", "displacement", "horsepower",
11+
"weight", "acceleration", "model_year", "origin", "car_name")
12+
13+
devtools::use_data(autompg)

data/autompg.rda

6 KB
Binary file not shown.

man/autompg.Rd

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

0 commit comments

Comments
 (0)