Learn R Programming

wrapr (version 1.5.0)

partition_tables: Partition as set of talbes into a list.

Description

Partition a set of tables into a list of sets of tables. Note: removes rownames.

Usage

partition_tables(tables_used, partition_column, ..., source_usage = NULL,
  source_limit = NULL, tables = NULL, env = NULL)

Arguments

tables_used

charater, names of tables to look for.

partition_column

character, name of column to partition by (tables should not have NAs in this column).

...

force later arguments to bind by name.

source_usage

optional named map from tables_used names to sets of columns used.

source_limit

optional numeric scalar limit on rows wanted every source.

tables

named map from tables_used names to data.frames.

env

environment to also look for tables named by tables_used

Value

list of names maps of data.frames partitioned by partition_column.

See Also

execute_parallel

Examples

Run this code
# NOT RUN {
d <- data.frame(a = 1:5, g = c(1, 1, 2, 2, 2))
partition_tables("d", "g", tables = list(d = d))

# }

Run the code above in your browser using DataLab