Turn Images into Data Sets

The goal of 'image2data' is to extract images and return them into a data set, especially for teaching data manipulation and data visualization. Basically, the eponymous function takes an image file ('png', 'tiff', 'jpeg', 'bmp') and turn it into a data set, pixels being rows (subjects) and columns (variables) being their coordinate positions (x- and y-axis) and their respective color (in hex codes). The function can return a complete image or a range of color (i.e., contour, silhouette). The data can then be manipulated as would any data set by either creating other related variables (to hide the image) or as a genuine toy data set.


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("image2data")

1.0.1 by P.-O. Caron, 4 years ago


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


Authors: P.-O. Caron [aut, cre, cph] , Alexandre Dufresne [aut, cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports readbitmap


See at CRAN