Convert Files to and from IDX Format to Vectors, Matrices and Arrays

Convert files to and from IDX format to vectors, matrices and arrays. IDX is a very simple file format designed for storing vectors and multidimensional matrices in binary format. The format is described on the website from Yann LeCun < http://yann.lecun.com/exdb/mnist/>.


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')"

News

idx2r 1.0.0.0

  • Initial release of the package

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("idx2r")

1.0.0 by Erik Doffagne, a year ago


https://github.com/edoffagne/idx2r


Browse source code at https://github.com/cran/idx2r


Authors: Erik Doffagne


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests testthat


See at CRAN