PLSDA_from_file_and_predict_second_dataset: Partial Least Squares and predict second dataset

View source: R/PLSDA_from_file_and_predict_second_dataset.R

PLSDA_from_file_and_predict_second_datasetR Documentation

Partial Least Squares and predict second dataset

Description

Builds PLS model from training dataset and Writes out loadings. Predicts classifications of test dataset and returns dataframe of predictions

Usage

PLSDA_from_file_and_predict_second_dataset(file, file2, sample.names,
  response.values, sample.names2 = NULL, response.values2 = NULL,
  comps = 3, scale = F, ind.names = F)

Arguments

file

file for X matirx

file2

file for test data matrix

sample.names

Vector of sample names in X matrix

response.values

Vector of response values in same order matching sample.names

sample.names2

Vector of sample names in 2nd dataset, if needed

comps

number of components to compute

scale

default=T

ind.names

Labels the samples, default =F

response.values

Vector of response values in same order matching sample.names2, if available


KSheu/ksheu.library1 documentation built on Jan. 28, 2025, 3:26 p.m.