Learn R Programming

narray (version 0.5.1)

construct: 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)

Value

A structured array

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