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

View source: R/pixset.R

as.data.frame.pixsetR 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

imager documentation built on May 29, 2024, 1:38 a.m.