Description
From insightsengineering/teal#436 (comment)
[The specific form of the arguments such as all()
and list()
are just examples]
-
Would be great to specify say data_extract_spec(<>, filter_spec = list()) to just get the select and vice versa
-
Would be great to specify say data_extract_spec(<>, col_types = c("numeric", "date")) where the select/filter_spec is populated with only numeric/date columns
-
Would be great to say specify data_extract_spec(all(), ...) to get UI where you can select from all datanames (at the moment data_extract_spec needs a single dataset but the api could be changed to handle this more smoothly)
After all of these in tmg the default arguments for the modules could be chosen sensibly so defining apps could be so simpler:
E.g. tm_outliers
could have default args:
tm_outliers<- function( ...
outlier_var = data_extract_spec(all(), filter_spec = list(), col_types = c("numeric"),
categorical_var = data_extract_spec(all(), select_spec = list(), col_types = c("factor"),
...
) { ... }
Then app developers could just use tm_outliers()
🥳