df_to_array: Data.frame to array conversion

View source: R/arrays-core.R

df_to_arrayR Documentation

Data.frame to array conversion

Description

Convert a data.frame object to an array

Usage

df_to_array(data, covariates, value.var, fill = 0)

Arguments

data

A data.frame.

covariates

Character vector. The covariates to use for array dimensions. Unselected dimensions will be collapsed.

value.var

Character. The name of the column which contains the value for the array.

fill

Numeric. The value to use when the combination of covariates does not exist in the data.frame

Value

An array whose dimensions correspond to the selected covariates.


GuillaumeBiessy/arrays documentation built on Dec. 23, 2024, 3:23 a.m.