Learn R Programming

scanstatistics (version 0.1.0)

create_table: Create a data.table with all combinations of the supplied variables.

Description

Create a data.table with all combinations of the supplied variables.

Usage

create_table(col_list, keys = NULL)

Arguments

col_list

A named list of the variables you want in your data.table.

keys

Character vector of one or more column names which is passed to setkey.

Value

A data.table with all combinations of the variables supplied in col_list.

Examples

Run this code
# NOT RUN {
cols <- list(location = 1:2, time = 0:2, stream = 1:2)
create_table(cols)
# }

Run the code above in your browser using DataLab