Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

collect

collect function


Description

Collects all outputs saved at the provided saveAt parameter from the SSI analysis when testing data was splited according to argument subset.

Usage

collect(prefix = "")

Arguments

prefix

(character) Prefix that was added to the output files name, this may include a path

Value

An object of the class 'SSI' for which methods fitted, plot and summary exist

Author(s)

Marco Lopez-Cruz (maraloc@gmail.com) and Gustavo de los Campos

Examples

require(SFSI)
  data(wheatHTP)
  
  X = scale(X[1:300,])/sqrt(ncol(X))   # Subset and scale markers
  G = tcrossprod(X)                    # Genomic relationship matrix
  y = as.vector(scale(Y[1:300,"YLD"])) # Subset response variable

  prefix <- paste0(tempdir(),"/testSSI")
  
  # Run the analysis into 4 subsets and save them at a given prefix
  fm <- SSI(y,K=G,tst=1:100,trn=101:length(y),subset=c(1,4),saveAt=prefix)
  fm <- SSI(y,K=G,tst=1:100,trn=101:length(y),subset=c(2,4),saveAt=prefix)
  fm <- SSI(y,K=G,tst=1:100,trn=101:length(y),subset=c(3,4),saveAt=prefix)
  fm <- SSI(y,K=G,tst=1:100,trn=101:length(y),subset=c(4,4),saveAt=prefix)

  # Collect all results after completion
  fm <- collect(prefix)

SFSI

Sparse Family and Selection Index

v0.3.0
GPL-3
Authors
Marco Lopez-Cruz [aut, cre], Gustavo de los Campos [aut], Paulino Perez-Rodriguez [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.