array_to_df: Convert array to a linear data.frame. Preserves array names...

View source: R/utils.R

array_to_dfR Documentation

Convert array to a linear data.frame. Preserves array names if present.

Description

This conversion is useful when preparing the data to summarise with ggplot.

Usage

array_to_df(arr)

Arguments

arr

array

Value

data.frame with 'x', 'y', 'z', 'channel' and 'value.' 'channel' will be the channel name if found, otherwise it is equivalent to 'z'.

Examples

arr <- array(1:24, dim = c(4, 3, 2))
array_to_df(arr)

picohdr documentation built on Oct. 28, 2024, 5:08 p.m.