array_to_df {picohdr}R 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)

[Package picohdr version 0.1.1 Index]