Reshape a long format data.table using key-value pairs with
data.table::dcast
Usage
dt_keybin_reshape(
x,
id_name,
key_name,
positive = 1,
negative = 0,
xname = NULL,
verbosity = 1L
)Arguments
- x
data.tableobject.- id_name
Character: Name of column in
xthat defines the IDs identifying individual rows.- key_name
Character: Name of column in
xthat holds the key.- positive
Numeric or Character: Used to fill id ~ key combination present in the long format input
x.- negative
Numeric or Character: Used to fill id ~ key combination NOT present in the long format input
x.- xname
Character: Name of
xto be used in messages.- verbosity
Integer: Verbosity level.