Description Usage Arguments Value Examples
A function that generate PCA and dimension reduction plots.
1 | plotPCA(dataframe, new_data, plot_type)
|
dataframe |
A dataframe with rownames representing the sample ID and each column is one of sample's antimicrobial features. If the value equals to 1, the sample has this antimicrobial feature. If the value equals to 0, the sample does not have this antimicrobial feature. |
new_data |
The new data of dataframe must contain columns (variables) with the same names and in the same order as the data used to compute PCA. |
plot_type |
The type of plot need to be generated. For individual PCA plot, using "individual". For visualizing relationship between variables, using "variables". For predict new data and its relationship with old data, using "predict". |
Returns the PCA plot.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.