You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
value_choices seems to support the concept of delayed_data:
However, var_choices must be a character vector, delayed_data objects are not accepted.
Is this an oversight or am I missing something?
Also, the subset argument can accept a function that only takes a data argument, in keeping with other similar cases throughout the package, but this seems insufficient. In the example given in the documentation:
Or the function passed to subset could operate on a variable rather than the whole dataset.
Finally, passing choices_labeled to var_choices may run into another issue: [.tbl_df has very strict argument checks, which results in
> data <- cdisc_data(ADSL = rADSL)
> value_choices(
+ data[["ADSL"]],
+ var_choices = variable_choices(data[["ADSL"]], function(data) names(Filter(is.factor, data)))
+ ) |> summary()
Error in `data[var_choices]`:
! Can't subset columns with `var_choices`.
✖ `var_choices` must be logical, numeric, or character, not a <choices_labeled/character> object.
Run `rlang::last_trace()` to see where the error occurred.
What is your question?
value_choices
seems to support the concept ofdelayed_data
:However,
var_choices
must be a character vector,delayed_data
objects are not accepted.Is this an oversight or am I missing something?
Also, the
subset
argument can accept a function that only takes adata
argument, in keeping with other similar cases throughout the package, but this seems insufficient. In the example given in the documentation:One must specify the variable manually and, again, delayed data does not seem to be supported.
Wouldn't something like this be more thorough?
This way one could do
Or the function passed to
subset
could operate on a variable rather than the whole dataset.Finally, passing
choices_labeled
tovar_choices
may run into another issue:[.tbl_df
has very strict argument checks, which results inbut convert the
tibble
to adata.frame
andIt seems
value_choices.data.frame
should rather dodata[as.vector(var_choices)]
.Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: