as.data.frame.pixset {imager}R Documentation

Methods to convert pixsets to various objects

Description

Methods to convert pixsets to various objects

Usage

## S3 method for class 'pixset'
as.data.frame(x, ..., drop = FALSE)

Arguments

x

pixset to convert

...

ignored

drop

drop flat dimensions

See Also

where

Examples



px <- boats > 250
#Convert to array of logicals
as.logical(px) %>% dim
#Convert to data.frame: gives all pixel locations in the set
as.data.frame(px) %>% head
#Drop flat dimensions
as.data.frame(px,drop=TRUE) %>% head

[Package imager version 1.0.2 Index]