R/getPCAObject.R

Defines functions getPCAObject

Documented in getPCAObject

getPCAObject <-
function(x, pcaMethod='prcomp', pcaParams=NULL){
  run = paste(pcaMethod, '(x', sep='') ;
  
  if(!is.null(pcaParams)){
    for(i in names(pcaParams)){
      run = paste(run, ',', i, '=', pcaParams[i], sep='')
    }
  }

  run = paste(run, ')', sep='')

  return(eval(parse(text=run)));
}
juscelino-izidoro/supcavs documentation built on Jan. 2, 2022, 7:49 a.m.