Generates an interactive three-dimensional biplot referred to the two principal components (PC) indicated by the user. The Biplot 2D 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).
Biplot2D( data, scaling = "NO", PCx = 1, PCy = 2, load.filter = 0, mag.fact = "NO" )
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 be displayed with 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. |
PCx | A numeric value indicating which principal component will be displayed on the x axis (e.g. 1 for PC1, 2 for PC2, 3 for PC3, etc.) |
PCy | A numeric value indicating which principal component will be displayed on the y axis (e.g. 1 for PC1, 2 for PC2, 3 for PC3, etc.) |
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. |
A two-dimensional interactive biplot as a Plotly object.