intersect_doPCA_from_file_and_project_second_dataset: PCA from file and project second dataset

View source: R/intersect_doPCA_from_file_and_project_second_dataset.R

intersect_doPCA_from_file_and_project_second_datasetR Documentation

PCA from file and project second dataset

Description

Reads two files with samples in columns and variables in rows. Intersect the common variables. Do PCA on file and project file2 onto this PCA. Writes to file scores, loadings, eigenvalues of original PCA. Writes to file rotated scores of the projected dataset.

Usage

intersect_doPCA_from_file_and_project_second_dataset(
  file,
  file2,
  train_string,
  center = TRUE,
  scale = FALSE,
  fread = F
)

Arguments

file

Filepath/filename of data matrix with no row numbering. Data file to do PCA on.

file2

Filepath/filename of data matrix with no row numbering. Data file to project.

train_string

String to insert into filename of rotated scores

center

default=T

scale

default=F

fread

default=F, use fread for large input files


graeberlab-ucla/glab.library documentation built on Oct. 28, 2024, 10:48 a.m.