<set_var_types
> wrapper that accepts tidyselect syntax.
Character vector-based selection still works.
set_var_types_x
accepts xpose_data
or xp_xtras
objects.
set_var_types
without _x
is defined with S3 methods. To maintain xpose
expectations,
the default method is <set_var_types
>, but if an xp_xtras
object
is used, the method uses set_var_types_x
.
Arguments
- xpdb
An
xpose_data
object.- .problem
The problem number to which the edits will be applied.
- ...
<
dynamic-dots
> Passed toset_var_types
after processing.- auto_factor
If
TRUE
new columns assigned to the type 'catcov' will be converted to factor.- quiet
Logical, if
FALSE
messages are printed to the console.
Examples
data("xpdb_ex_pk", package = "xpose")
# Change variable type
xpdb_2 <- set_var_types_x(
xpdb_ex_pk, .problem = 1,
idv = TAD,
catcov = starts_with("MED"),
contcov = c(CLCR,AGE)
)