franken_prop | R Documentation |
franken_xpdb
Combine a property from all components of a franken_xpdb
franken_prop(
xpdb_f,
xpdb_list,
prop,
problem = NULL,
glue_cmd = function(x) glue::glue_collapse(x, ", ", last = " and "),
indices = seq_along(xpdb_list)
)
xpdb_f |
A product of |
xpdb_list |
List of the source |
prop |
< |
problem |
< |
glue_cmd |
Any special transformation to the properties, including how to collapse. |
indices |
< |
This function is meant to be called within franken_xpdb
.
It is expected to be ready to handle cases where, for example,
multiple props are being set in a pipe, or a problem-associated
property is being set while a problem=0 property is also being
set.
This is a low-level function, so its use outside of internal functions is not intended.
Same as xpdb_f
with new properties.
# This is designed to be called in a function environment which
# would provide something like the following:
xpdb_f <- franken_xpdb(pheno_base, pheno_final, .types="catcov")
xpdb_list <- list(pheno_base, pheno_final)
# The following would be inside the function
xpdb_f %>%
franken_prop(xpdb_list, "run",
glue_cmd = function(x) paste(x, collapse="+"))
# xpdb_f may have to be written to a few times if
# and problem-specific combinations are needed:
updated <- xpdb_f %>%
franken_prop(xpdb_list, "run",
glue_cmd = function(x) paste(x, collapse="+"))
# problem will also be available. Assume there's
# no reason to loop here, but that may be needed
problem <- 1
updated <- updated %>%
franken_prop(xpdb_list, "ofv", problem=problem,
glue_cmd = function(x) paste(x, collapse="&"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.