varietal2distributional: Convert varietal to distributional data

View source: R/toolbox.R

varietal2distributionalR Documentation

Convert varietal to distributional data

Description

Convert an object of class varietal either to a list of distributional objects by breaking it up into separate elements, or to a single distributional object corresponding to the first principal component.

Usage

varietal2distributional(x, bycol = FALSE, plot = FALSE)

Arguments

x

an object of class varietal.

bycol

logical. If TRUE, returns a list of distributional objects (one for each element). If FALSE, returns a single distributional object (containing the PC1 scores for each sample).

plot

logical. If TRUE, shows the PCA biplot that is used when bycol is FALSE.

Examples

Ttn_file <- system.file("SNSM/Ttn_chem.csv",package="provenance")
Ttn <- read.varietal(fn=Ttn_file,snames=3)
varietal2distributional(Ttn,bycol=FALSE,plot=TRUE)

provenance documentation built on Aug. 28, 2023, 5:07 p.m.