knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) # total ucimlr datasets datasets <- data(package = "ucimlr") total_datasets_names <- datasets$results[, "Item"] dataset_names <- glue::glue("* `{total_datasets_names}` \n") total_datasets <- length(datasets$results[, "Item"])
The goal of ucimlr
is to give R users easy access to datasets found at the University of Irvine's Machine Learning Repository. The benefits of using this package are:
Note that data in this repository dates back to 1987, the format across datasets are not consistent. Some inconsistencies include column separation and the way NA values are handled. Luckily, data in ucimlr
follows a consistent structure that any R user can dive into. The structure is as follows:
stringAsFactors = FALSE
tibble
Note on point 3: Factors aren't evil, but I'd rather the user decide when to code something as factor or not.
Currently, there are r nrow(ucimlr::ucidata())
datasets available at the official repository and r total_datasets
available in ucimlr
. These numbers update every time the README.Rmd is reknit.
Keep in mind that this is a data package. As of now the package is ~r ucimlr:::pkg_size("ucimlr")
and it will continue to grow. You can install ucimlr
from GitHub with devtools
:
# install.packages("devtools") devtools::install_github("tyluRp/ucimlr")
We can load data by name and we can scrape the current list of datasets using the ucidata
function:
library(ucimlr) automobile ucidata() ucinews()
I'd suggest loading data using R's ::
so that you can access all exported variables without loading the package. This will prevent any namespace collisions and have an additional benefit of autopopulating all the datasets and functions (assuming you're using RStudio). Alternatively, to see a list of all available datasets you can run: data(package = "ucimlr")
There are a lot of datasets and I'm slowly adding as many as I can. If you'd like to add a dataset, fix something, suggest an improvement, etc., please file an issue or submit a pull request!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.