Skip to content
/ idx2r Public

❗ This is a read-only mirror of the CRAN R package repository. idx2r — Convert Files to and from IDX Format to Vectors, Matrices and Arrays. Homepage: https://github.com/edoffagne/idx2r

License

Notifications You must be signed in to change notification settings

cran/idx2r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using IDX files with R

Build Status

Introduction

This package provides functions to convert files to and from IDX format to arrays in R. IDX is a format to store vector and arrays in binary format.

Reading IDX format is needed for instance to use the MNIST database of handwritten digits provided by Yann LeCun.

Usage

This basic example downloads, uncompresses and reads the IDX file from the train set of the MNIST data.

library(idx2r)
library(R.utils)
URL = "http://yann.lecun.com/exdb/mnist/"
file_name = "train-images-idx3-ubyte.gz"
download.file(paste0(URL, file_name), "train-images-idx3-ubyte.gz")
gunzip(file_name)
train = read_idx(gsub(pattern = "\\.gz", "", file_name))
dim(train)

Installation

The package can be installed from GitHub with the following command:

$ R -e "devtools::install_github('edoffagne/idx2r')"

About

❗ This is a read-only mirror of the CRAN R package repository. idx2r — Convert Files to and from IDX Format to Vectors, Matrices and Arrays. Homepage: https://github.com/edoffagne/idx2r

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages