Partition a set of tables into a list of sets of tables. Note: removes rownames.
partition_tables( tables_used, partition_column, ..., source_usage = NULL, source_limit = NULL, tables = NULL, env = NULL )Arguments tables_used
character, names of tables to look for.
partition_columncharacter, name of column to partition by (tables should not have NAs in this column).
...force later arguments to bind by name.
source_usageoptional named map from tables_used names to sets of columns used.
source_limitoptional numeric scalar limit on rows wanted every source.
tablesnamed map from tables_used names to data.frames.
envenvironment to also look for tables named by tables_used
Valuelist of names maps of data.frames partitioned by partition_column.
See also Examplesd1 <- data.frame(a
= 1:5, g
= c(1,
1,
2,
2,
2)) d2 <- data.frame(x
= 1:3, g
= 1:3) d3 <- data.frame(y
= 1) partition_tables(c("d1",
"d2",
"d3"),
"g", tables
= list(d1
= d1, d2
= d2, d3
= d3))#> $`1` #> $`1`$d1 #> a g #> 1 1 1 #> 2 2 1 #> #> $`1`$d2 #> x g #> 1 1 1 #> #> $`1`$d3 #> y #> 1 1 #> #> #> $`2` #> $`2`$d1 #> a g #> 1 3 2 #> 2 4 2 #> 3 5 2 #> #> $`2`$d2 #> x g #> 1 2 2 #> #> $`2`$d3 #> y #> 1 1 #> #> #> $`3` #> $`3`$d1 #> [1] a g #> <0 rows> (or 0-length row.names) #> #> $`3`$d2 #> x g #> 1 3 3 #> #> $`3`$d3 #> y #> 1 1 #> #>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4