construct: Transform a data.frame with axes and value into an array

View source: R/construct.r

constructR Documentation

Transform a data.frame with axes and value into an array

Description

The construct() function can be called either with the data.frame as the first argument or the formula and then specify 'data=<data.frame>'

Usage

construct(data, formula = guess_structure(data), fill = NA,
  name_axes = TRUE)

Arguments

data

A data frame

formula

A formula: value ~ axis1 [+ axis2 + axis n ..]

fill

Value to fill array with if undefined

name_axes

Keep column names of 'data' as axis names

Value

A structured array


narray documentation built on Oct. 2, 2022, 5:08 p.m.