projectR {projectR} | R Documentation |
A function for the projection of new data into a previously defined feature space.
projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, ...) ## S4 method for signature 'matrix,matrix' projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, NP = NA, full = FALSE, family = "gaussianff") ## S4 method for signature 'matrix,LinearEmbeddingMatrix' projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, NP = NA, full = FALSE, model = NA, family = "gaussianff") ## S4 method for signature 'matrix,prcomp' projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, NP = NA, full = FALSE) ## S4 method for signature 'matrix,rotatoR' projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, NP = NA, full = FALSE) ## S4 method for signature 'matrix,correlateR' projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, NP = NA, full = FALSE) ## S4 method for signature 'matrix,hclust' projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, full = FALSE, targetNumPatterns, sourceData) ## S4 method for signature 'matrix,kmeans' projectR(data, loadings, dataNames = NULL, loadingsNames = NULL, full = FALSE, sourceData)
data |
Target dataset into which you will project. It must of type matrix. |
loadings |
loadings learned from source dataset. |
dataNames |
a vector containing unique name, i.e. gene names, for the rows of the target dataset to be used to match features with the loadings, if not provided by |
loadingsNames |
a vector containing unique names, i.e. gene names, for the rows ofloadings to be used to match features with the data, if not provided by |
... |
Additional arguments to projectR |
NP |
vector of integers indicating which columns of loadings object to use. The default of NP=NA will use entire matrix. |
full |
logical indicating whether to return the full model solution. By default only the new pattern object is returned. |
family |
VGAM family function for model fitting (default: "gaussianff") |
model |
Optional arguements to choose method for projection |
targetNumPatterns |
desired number of patterns |
sourceData |
data used to create cluster object |
loadings
can belong to one of several classes depending on upstream
analysis. Currently permitted classes are matrix
, CogapsResult
,
CoGAPS
, pclust
, prcomp
, rotatoR
,
and correlateR
.
A matrix of sample weights for each input basis in the loadings matrix (if full=TRUE, full model solution is returned).
projectR(data=p.ESepiGen4c1l$mRNA.Seq,loadings=AP.RNAseq6l3c3t$Amean, dataNames = map.ESepiGen4c1l[["GeneSymbols"]]) library("CoGAPS") CR.RNAseq6l3c3t <- CoGAPS(p.RNAseq6l3c3t, params = new("CogapsParams", nPatterns=5)) projectR(data=p.ESepiGen4c1l$mRNA.Seq,loadings=CR.RNAseq6l3c3t, dataNames = map.ESepiGen4c1l[["GeneSymbols"]]) pca.RNAseq6l3c3t<-prcomp(t(p.RNAseq6l3c3t)) pca.ESepiGen4c1l<-projectR(data=p.ESepiGen4c1l$mRNA.Seq, loadings=pca.RNAseq6l3c3t, dataNames = map.ESepiGen4c1l[["GeneSymbols"]]) pca.RNAseq6l3c3t<-prcomp(t(p.RNAseq6l3c3t)) r.RNAseq6l3c3t<-rotatoR(1,1,-1,-1,pca.RNAseq6l3c3t$rotation[,1:2]) pca.ESepiGen4c1l<-projectR(data=p.ESepiGen4c1l$mRNA.Seq, loadings=r.RNAseq6l3c3t, dataNames = map.ESepiGen4c1l[["GeneSymbols"]]) c.RNAseq6l3c3t<-correlateR(genes="T", dat=p.RNAseq6l3c3t, threshtype="N", threshold=10, absR=TRUE) cor.ESepiGen4c1l<-projectR(data=p.ESepiGen4c1l$mRNA.Seq, loadings=c.RNAseq6l3c3t, NP="PositiveCOR", dataNames = map.ESepiGen4c1l[["GeneSymbols"]])