PLSR_from_file_and_predict_second_dataset: Partial Least Squares and predict second dataset

Description Usage Arguments

View source: R/PLSR_from_file_and_predict_second_dataset.R

Description

Builds PLS model from training dataset and predicts second dataset Writes out predicted.scores of the second dataset Plots original PLS, projected samples only, and projected samples ontop of original PLS

Usage

1
2
3
4
PLSR_from_file_and_predict_second_dataset(file, file2, sample.names,
  sample.type, y.response, sample.names2 = NULL, sample.type2 = NULL,
  train_string, title = "PLSR", comp.x = "comp.1", comp.y = "comp.2",
  comps = 3, scale = F, labels = F, fread = FALSE)

Arguments

file

file for X matirx

file2

file for test data matrix

sample.names

Vector of sample names in X matrix

sample.type

vector of sample groups

y.response

numeric vector of response values in same order as samples

sample.names2

Vector of sample names in 2nd dataset, if needed

sample.type2

Vector of sample types in 2nd dataset, if needed

train_string

string to insert in file name of predicted scores

title

title of the plot

comp.x, comp.y

comps to display

scale

default=T

labels

label the plot, default = T

fread

default=F, use fread for large input files

comp

number of components to compute


KSheu/ksheu.lib documentation built on Oct. 14, 2020, 11:55 p.m.