visualizeFullFamily | R Documentation |
Shiny gadget that shows the ordinations from an entire family of gPCAs and returns a gPCA object with the one selected by the user.
visualizeFullFamily(fullFamily, sample_data = NULL, sample_mapping = aes_string(x = "Axis1", y = "Axis2"), sample_facet = NULL, var_data = NULL, var_mapping = aes_string(x = "Axis1", y = "Axis2"), layout = c(2, 6))
fullFamily |
The output from |
sample_data |
Optional data used for plotting the samples |
sample_mapping |
An aesthetic mapping to be passed to
|
sample_facet |
A |
var_data |
Optional data used for plotting the variables |
var_mapping |
An aesthetic mapping to be passed to
|
layout |
A vector of length 2. The first number gives the number of columns (out of 12) for the sidebar, the second number gives the number of columns (out of 12) for the sample plot in the main panel. |
This function will open a 'shiny' app in a browser
window. You can investigate the results for different values of
r with this app. Once you press the 'done' button, the app
will close and the function will return an R object containing the
results for the value of r (the regularization parameter)
that was chosen in the app. The returned object is a list
containing the variable loadings on the principal axes (QV
),
the sample/row scores (U
), and the fraction of the variance
explained by each of the axes (vars
).
## Not run: data(AntibioticPhyloseq) pp = processPhyloseq(AntibioticPhyloseq) out.ff = gpcaFullFamily(pp$X, Q = pp$Q, D = pp$D, k = 2) out.agpca = visualizeFullFamily(out.ff, sample_data = sample_data(AntibioticPhyloseq), sample_mapping = aes(x = Axis1, y = Axis2, color = condition), var_data = tax_table(AntibioticPhyloseq), var_mapping = aes(x = Axis1, y = Axis2, color = Phylum)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.