Skip to content

Commit

Permalink
Roll the autompg dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Sep 8, 2017
1 parent a3cf3d7 commit df46511
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ucidata
Title: Collection of Datasets from the UCI Irving Machine Learning Repository
Version: 0.0.1
Version: 0.0.2
Authors@R: person("James", "Balamuta", email = "[email protected]", role = c("aut", "cre"))
Description: Varying datasets from the UCI Irving Machine Learning Repository
Depends: R (>= 3.4.1)
Expand Down
25 changes: 25 additions & 0 deletions R/pkg_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,28 @@
#' <https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.names>
#' <https://archive.ics.uci.edu/ml/datasets/wine>
"wine"


#' Autompg Data Set
#'
#' This dataset is a slightly modified version of the dataset provided in
#' the StatLib library. In line with the use by Ross Quinlan (1993) in
#' predicting the attribute "mpg", 8 of the original instances were removed
#' because they had unknown values for the "mpg" attribute.
#' @format A data frame with 6497 observations (1599 Red and 4898 White) on the following 12 variables.
#' - `mpg`: continuous
#' - `cylinders`: multi-valued discrete
#' - `displacement`: continuous
#' - `horsepower`: continuous
#' - `weight`: continuous
#' - `acceleration`: continuous
#' - `model_year`: multi-valued discrete
#' - `origin`: multi-valued discrete
#' - `car_name`: string (unique for each instance)
#' @source This dataset was taken from the StatLib library which is
#' maintained at Carnegie Mellon University. The dataset was
#' used in the 1983 American Statistical Association Exposition.
#' @references
#' <https://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.names>
#' <https://archive.ics.uci.edu/ml/datasets/auto+mpg>
"autompg"
13 changes: 13 additions & 0 deletions data-raw/autompg_build.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### UCI Irving
## autompg Data https://archive.ics.uci.edu/ml/datasets/auto+mpg

autompg = read.table(
"http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data",
quote = "\"",
comment.char = "",
stringsAsFactors = FALSE)

colnames(autompg) = c("mpg", "cylinders", "displacement", "horsepower",
"weight", "acceleration", "model_year", "origin", "car_name")

devtools::use_data(autompg)
Binary file added data/autompg.rda
Binary file not shown.
37 changes: 37 additions & 0 deletions man/autompg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit df46511

Please sign in to comment.