rowwiseDT: Create a data.table row-wise

View source: R/rowwiseDT.R

rowwiseDTR Documentation

Create a data.table row-wise

Description

rowwiseDT creates a data.table object by specifying a row-by-row layout. This is convenient and highly readable for small tables.

Usage

rowwiseDT(...)

Arguments

...

Arguments that define the structure of a data.table. The column names come from named arguments (like col=), which must precede the data. See Examples.

Value

A data.table. The default is for each column to return as a vector. However, if any entry has a length that is not one (e.g., list(1, 2)), the whole column will be converted to a list column.

See Also

data.table

Examples

rowwiseDT(
  A=,B=, C=,
  1, "a",2:3,
  2, "b",list(5)
)

Rdatatable/data.table documentation built on Nov. 25, 2024, 1:15 p.m.