as.data.frame.cimg | R Documentation |
This function combines the output of pixel.grid with the actual values (stored in $value)
## S3 method for class 'cimg'
as.data.frame(x, ..., wide = c(FALSE, "c", "d"))
x |
an image of class cimg |
... |
arguments passed to pixel.grid |
wide |
if "c" or "d" return a data.frame that is wide along colour or depth (for example with rgb values along columns). The default is FALSE, with each pixel forming a separate entry. |
a data.frame
Simon Barthelme
#First five pixels
as.data.frame(boats) %>% head(5)
#Wide format along colour axis
as.data.frame(boats,wide="c") %>% head(5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.