Biplot3D: Biplot3D

Description Usage Arguments Value Examples

View source: R/Biplot3D.R

Description

Generates an interactive three-dimensional biplot referred to the first three principal components (PC). The Biplot 3D function will automatically center the user's input data. However, data can be scaled to have unit variance before performing the Principal Component Analysis (PCA).

Usage

1
Biplot3D(data, scaling = "NO", load.filter = 0, mag.fact = "NO")

Arguments

data

A data frame containing the data matrix. The input data frame has to be created following a precise structure. Specifically, the dataset has to be generated in R-mode, i.e. showing variables (features) in columns and samples (objects) in rows. Additionally, the first column should contain all the sample annotations (e.g. sample name, sample number, etc.), which will be displayed next to each point in the biplot. Furthermore, the second column has to be filled with parameters (e.g., types, species, treatments, etc.) useful for samples classification into groups. In this way, all the points referring to samples sharing the same properties will have the same color in the biplot. Variable values are listed starting from the third column onwards. Here, column headers should contain the name of the related feature. These names will be displayed next to the corresponding loading vector in the biplot.

scaling

Do you wish to scale your data prior to PC calculation? Set "YES" if you do; otherwise set "NO". The latter choice is set as default.

load.filter

A numerical threshold ranging from 0 to 1. Only features with loadings greater than the load.filter value will be shown in the biplot. load.filter=0 is set as default (all features will be displayed).

mag.fact

The amplification of loading vectors length can improve the biplot intelligibility. Set "AUTO" if you want an automatic amplification to be performed, otherwise specify an amplification factor value (e.g. mag.fact=2). If no amplification is required, set mag.fact="NO". The latter choice is set as default.

Value

A three-dimensional interactive biplot as a Plotly object.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

> Biplot3D(data,scaling="NO",load.filter=0.2,mag.fact=2)
# Here, a three-dimensional biplot is generated using centered data. Only
features having loadings greater than 0.2 will be displayed in the biplot.
In addition, loading vector length will be doubled in their length.


## End(Not run)

AnCaste/BiPlotteR documentation built on Dec. 17, 2021, 8:48 a.m.