stack: Stack columns

View source: R/reshape.R

stackR Documentation

Stack columns

Description

Convert selected columns into long format with an indicator column.

Usage

stack(data, select = NULL, drop = FALSE)

Arguments

data

A data frame or data table.

select

Optional character vector of columns to stack.

drop

Whether to drop rows with missing values.

Value

A basetable with a stacked value column.


basetable documentation built on Sept. 18, 2026, 9:13 a.m.