focus_xpdb | R Documentation |
For piping, set is passed, but with S3 method transformations are applied to the focused xpdb
object.
focus_xpdb(xpdb_s, ..., .add = FALSE)
unfocus_xpdb(xpdb_s)
focused_xpdbs(xpdb_s)
focus_function(xpdb_s, fn, ...)
focus_qapply(xpdb_s, fn, ..., .mods = everything())
xpdb_s |
< |
... |
< |
.add |
< |
fn |
< |
.mods |
< |
While these functions are used internally, it is recognized that they may have value in user scripting. It is hoped these are self-explanatory, but the examples should address common uses.
Note: focus_qapply()
(re)focuses as specified in .mods
and then un-focuses all elements
of the set so should only be used in the case where a quick application
suffices. Otherwise, focusing with a sequence of focus_function
calls
(or a monolithic single focus_function
call with a custom function)
should be preferred.
An xpose_set
object with the focused xpdb object(s)
# Select two xpdb objects to focus on
xpdb_set %>% focus_xpdb(mod2,fix1)
# Add a focus
xpdb_set %>% focus_xpdb(mod2,fix1) %>% focus_xpdb(mod1, .add=TRUE)
# Remove focus
xpdb_set %>% focus_xpdb(mod2,fix1) %>% focus_xpdb()
# Focus function and tidyselect
pheno_set %>%
focus_xpdb(everything()) %>%
# Add iOFV col and iofv type to all xpdbs in set
focus_function(backfill_iofv) %>%
# Show 1... can do all like this, too, but no need
unfocus_xpdb() %>%
select(run6) %>%
{.[[1]]$xpdb} %>%
list_vars()
# Quick-apply version of previous example
pheno_set %>%
focus_qapply(backfill_iofv) %>%
select(run6) %>%
{.[[1]]$xpdb} %>%
list_vars()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.