PCbiplot: It takes a prcomp object and returns a PCA biplot for...

Description Usage Arguments Value Examples

View source: R/pca_biplot.R

Description

This function is a convenience function for quick plotting of PCA biplot

Usage

1
PCbiplot(PC, x = "PC1", y = "PC2")

Arguments

x

Name of first principal component vector. i.e. x = "PC1"

y

Name of second principal component vector. i.e. y = "PC2"

A

'prcomp' object returned by prcomp()

Value

A ggplot2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
PCbiplot(stats::prcomp(dfp 
                  group_by(genotype_id) 
                  summarise_if(is.numeric, mean, na.rm = T) 
                  select_at(which(map_lgl(., is.numeric))) 
                  select(-contains("rep")) 
                  scale())) +
  theme_bw() +
  theme(text = element_text(size = 15))

## End(Not run)

DeependraD/expdean documentation built on Nov. 25, 2019, 12:33 a.m.