insightsengineering / insightsengineering/teal.transform
[Feature Request]: Documentation improvements around `data_extract_spec` and `get_extract_datanames`
- Dominant language
- R
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### Feature description
The documentation of `get_extract_datanames` is a bit obscure. Particularly I find "Fetches dataname slot per `data_extract_spec` from a list of `data_extract_spec`" hard to follow: it works in a single object or it needs a list of `data_extract_spect` objects?
In addition, one link to `data_extract_spec()` might be helpful, and _vice versa_, a link from `data_extract_spec` to `get_extract_datanames` might help new users finding these functions for the first time.
Last, adding an example to `get_extract_datanames` might make it more approachable.
A simple example with just one dataset that could be added (it would be also nice to add with multiple datasets):
```r
adtte_filters <- filter_spec(
vars = c("PARAMCD", "CNSR"),
sep = "-",
choices = c("OS-1" = "OS-1", "OS-0" = "OS-0", "PFS-1" = "PFS-1"),
selected = "OS-1",
multiple = FALSE,
label = "Choose endpoint and Censor"
)
des <- data_extract_spec(
dataname = "ADTTE",
filter = adtte_filters,
select = select_spec(
choices = c("AVAL", "BMRKR1", "AGE"),
selected = c("AVAL", "BMRKR1"),
multiple = TRUE,
fixed = FALSE,
label = "Column"
)
)
get_extract_datanames(des)
```
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [X] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [X] I agree to follow this project's Security Policy.
Contributor guide
Assessment
This issue has not been assessed yet.