ARRAY_to_MM: ARRAY to MM

View source: R/interval_format_conversions.R

ARRAY_to_MMR Documentation

ARRAY to MM

Description

Convert a 3-dimensional array [n, p, 2] to MM format (data.frame with paired _min/_max columns).

Usage

ARRAY_to_MM(data)

Arguments

data

A numeric array of dimension [n, p, 2] where [,,1] stores minima and [,,2] stores maxima.

Value

A data.frame with 2p columns (paired _min/_max).

Examples

x <- array(NA, dim = c(4, 3, 2))
x[,,1] <- matrix(c(1,2,3,4, 5,6,7,8, 9,10,11,12), nrow = 4)
x[,,2] <- matrix(c(3,5,6,7, 8,9,10,12, 13,15,16,18), nrow = 4)
dimnames(x) <- list(paste0("obs_", 1:4), c("V1","V2","V3"), c("min","max"))
mm <- ARRAY_to_MM(x)
mm

dataSDA documentation built on June 12, 2026, 9:06 a.m.