-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
103 lines (79 loc) · 3.78 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# `ucidata` - Data Sets from UC Irvine's ML Library
<!-- badges: start -->
[![R-CMD-check](https://github.com/coatless-rpkg/ucidata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coatless-rpkg/ucidata/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The following is an _R_ data package that features certain data sets from
the [Machine Learning Library at UC Irvine](https://archive.ics.uci.edu/ml/).
These data sets have been cleaned up and provide documentation via _R_'s help system.
> [!NOTE]
>
> Want to easily access data sets not included in this package?
>
> Check out the [`{ucimlrepo}`](https://github.com/coatless-rpkg/ucimlrepo) R package!
> The package provides an interface to download and automatically load data
> sets from the UC Irvine Machine Learning Repository.
## Installation
You can install `ucidata` from github with:
```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("coatless-rpkg/ucidata")
```
## Using data in the package
There are two ways to access the data contained within this package.
The first is to load the package itself and type the name of a data set.
This approach takes advantage of _R_'s lazy loading mechansim, which avoids
loading the data until it is used in _R_ session. For details on
how lazy loading works, please see [Section 1.17: Lazy Loading](https://cran.r-project.org/doc/manuals/r-release/R-ints.html#Lazy-loading)
of the [R Internals](https://cran.r-project.org/doc/manuals/r-release/R-ints.html)
manual.
```{r use-data-package, eval = FALSE}
# Load the `ucidata` package
library("ucidata")
# See the first 10 observations of the `autompg` dataset
head(autompg)
# View the help documentation for `autompg`
?autompg
```
The second approach is to use the `data()` command to load data on the
fly without and type the name of a data set.
```{r use-data-call, eval = FALSE}
# Loading `autompg` without a `library(ucidata)` call
data("autompg", package = "ucidata")
# See the first 10 observations of the `autompg` dataset
head(autompg)
# View the help documentation for `autompg`
?autompg
```
## Included Data Sets
The following data sets are included in the `ucidata` package:
- [`abalone`](https://archive.ics.uci.edu/ml/datasets/abalone)
- [`adult`](https://archive.ics.uci.edu/ml/datasets/adult)
- [`autoimports`](https://archive.ics.uci.edu/ml/datasets/Automobile)
- [`autompg`](https://archive.ics.uci.edu/ml/datasets/auto+mpg)
- Breast Cancer Wisconsin:
- [`bcw_original` (Breast Cancer Wisconsin Original)](https://archive.ics.uci.edu/ml/datasets/breast+cancer+wisconsin+(original))
- Heart Disease
- [`heart_disease_cl`](https://archive.ics.uci.edu/ml/datasets/Heart+Disease)
- [`heart_disease_hu`](https://archive.ics.uci.edu/ml/datasets/Heart+Disease)
- [`heart_disease_va`](https://archive.ics.uci.edu/ml/datasets/Heart+Disease)
- [`heart_disease_ch`](https://archive.ics.uci.edu/ml/datasets/Heart+Disease)
- [`bike_sharing_daily`](https://archive.ics.uci.edu/ml/datasets/bike+sharing+dataset)
- [`bridges`](https://archive.ics.uci.edu/ml/datasets/Pittsburgh+Bridges)
- [`car_eval`](https://archive.ics.uci.edu/ml/datasets/Car+Evaluation)
- [`forest_fires`](https://archive.ics.uci.edu/ml/datasets/Forest+Fires)
- [`glass`](https://archive.ics.uci.edu/ml/datasets/Glass+Identification)
- [`hepatitis`](https://archive.ics.uci.edu/ml/datasets/hepatitis)
- [`wine`](https://archive.ics.uci.edu/ml/datasets/wine)
## Build Scripts
Want to see how each data set was imported? Check out the [`data-raw`](https://github.com/coatless-rpkg/ucidata/tree/master/data-raw) folder!