Learn R Programming

imager (version 0.42.19)

as.data.frame.pixset: Methods to convert pixsets to various objects

Description

Methods to convert pixsets to various objects

Usage

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

Arguments

x

pixset to convert

...

ignored

drop

drop flat dimensions

See Also

where

Examples

Run this code

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

Run the code above in your browser using DataLab