README.md

pca.biplot

The aim of this project was to make a simple to use customizable correlational biplot function, where R's default packages are used as much as possible. Principal components are scaled to unit variance. Now also includes a 3D biplot function.

Contents:

Installation

library(devtools)
install_github("StefaanVerwimp/Biplot")

Or download the R files locally and load them in using the function:

# Choose r-files
source(choose.files())

Example Usage

The simplest biplot:

data(iris)
library(pca.biplot)
pca.biplot(iris[,-5])

With some customization:

pca.biplot(iris[,-5], scale = T, col = c("#00AFBB", "#E7B800", "#FC4E07"),
           groups = iris$Species, ellipse = T, pch = 16, main = "Iris data biplot",
           legend.pos = 'topright', circle.options = list(border = "grey"))

In 3D:

pca.biplot3d(iris[,-5], groups = iris$Species, scale = T, box = T, grid = T, ellipse = T)

animated



StefaanVerwimp/Biplot documentation built on Feb. 10, 2021, 9:37 a.m.