image2data: 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.

Getting started

Package details

AuthorP.-O. Caron [aut, cre, cph] (<https://orcid.org/0000-0001-6346-5583>), Alexandre Dufresne [aut, cph]
MaintainerP.-O. Caron <pocaron19@gmail.com>
LicenseMIT + file LICENSE
Version1.0.1
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("image2data")

Try the image2data package in your browser

Any scripts or data that you put into this service are public.

image2data documentation built on Aug. 23, 2022, 1:07 a.m.