Closed jsta closed 7 years ago
@limnoliver How do you envision the user specifying a table with no columns? My ideas are one of :
dt_reduced <- lagos_select(dt, table_column_nested = list("epi.nutr" = ""))
dt_reduced <- lagos_select(dt, table_column_nested = list("epi.nutr" = NA))
It would be tricky to do either of the following under the existing selection framework:
dt_reduced <- lagos_select(dt, table_column_nested = list("epi.nutr"))
dt_reduced <- lagos_select(dt, table_column_nested = "epi.nutr")
Because the named list-elements are much different form than the full specification:
list("epi.nutr" = c("doc", "lagoslakeid"))
$epi.nutr [1] "doc" "lagoslakeid
versus
"epi.nutr"
[1] "epi.nutr"
or
list("epi.nutr")
[[1]] [1] "epi.nutr"
@jsta - is this getting at when a user wants to pull the whole table (intentionally) or when the user accidentally does not specify the columns. We could have an "all" grouping that the user could specify, which pulls all columns. And an error occurs if there is not some column name or group listed.
This is beyond the current scope of lagos_select
. The current strategy for returning entire tables is to just use the native R subsetting routines.
See #15