rowrecs_to_blocks_spec | R Documentation |
Create a row records to block records transform specification object that holds the pivot control table, specification of extra row keys, and control table keys.
rowrecs_to_blocks_spec(
controlTable,
...,
recordKeys = character(0),
controlTableKeys = colnames(controlTable)[[1]],
checkNames = TRUE,
checkKeys = FALSE,
strict = FALSE,
allow_rqdatatable = FALSE
)
controlTable |
an all character data frame or cdata pivot control. |
... |
not used, force later arguments to bind by name. |
recordKeys |
vector of columns identifying records. |
controlTableKeys |
vector of keying columns of the controlTable. |
checkNames |
passed to rowrecs_to_blocks. |
checkKeys |
passed to rowrecs_to_blocks. |
strict |
passed to rowrecs_to_blocks. |
allow_rqdatatable |
logical, if TRUE allow rqdatatable shortcutting on simple conversions. |
a record specification object
d <- wrapr::build_frame(
"id" , "AUC", "R2" |
1 , 0.7 , 0.4 |
2 , 0.8 , 0.5 )
transform <- rowrecs_to_blocks_spec(
wrapr::qchar_frame(
"measure", "value" |
"AUC" , AUC |
"R2" , R2 ),
recordKeys = "id")
print(transform)
d %.>% transform
inv_transform <- t(transform)
print(inv_transform)
# identity (in structure)
d %.>% transform %.>% inv_transform
# identity again (using .() "immediate" notation)
d %.>% transform %.>% .(t(transform))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.