parse_table | R Documentation |
Applies parsers to a table and coerces the result to a table of the same type.
parse_table(x, functions, as = c("table", "list"), enclos = globalenv(),
...)
x |
Table. |
functions |
Function or list thereof. If a list, any names are reused in the parsed results. |
as |
Type of object to return. If "table", a table of the same type as |
enclos |
Environment in which to look for objects not found in |
... |
Arguments passed to |
Other Table functions: as_table
,
create_table
, is_table
,
parse_table_type
,
rbind_tables
,
remove_empty_dimensions
,
write_table
df <- data.frame(x = 1:5, y = 6:10)
parsers <- list(
xx = function(x) {x + 10},
xy = function(x, y) {x + y}
)
parse_table(df, parsers)
parse_table(as.list(df), parsers)
parse_table(df, parsers, as = "list")
parsers$z = function(z) {z * 10}
parse_table(df, parsers)
parse_table(df, parsers, as = "list")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.