- Start R (using Rstudio or Docker) and load the required packages.
- Download the dataset (binary version) from http://www.cs.toronto.edu/~kriz/cifar.html manually or use the following function to download the data in the R environment. The function takes the working directory or the downloaded dataset's location path as an input parameter (data_dir):
# Function to download the binary filedownload.cifar.data <- function(data_dir) {dir.create(data_dir, showWarnings = FALSE)setwd(data_dir)if (!file.exists('cifar-10-binary.tar.gz')){download.file(url='http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz', destfile='cifar-10-binary.tar.gz', method='wget')untar("cifar-10-binary.tar.gz") # Unzip filesfile.remove("cifar-10-binary.tar.gz") ...