collect: collect function

Description Usage Arguments Value Author(s) Examples

View source: R/R_utils_wC.R

Description

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

Usage

1
collect(prefix = "")

Arguments

prefix

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 (lopezcru@msu.edu) and Gustavo de los Campos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  require(SFSI)
  data(wheatHTP)
  X = scale(X[1:300,])        # Subset and scale markers
  G = tcrossprod(X)/ncol(X)   # Genomic relationship matrix
  y = 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)

MarcooLopez/SFSI_data documentation built on April 15, 2021, 10:53 a.m.