Last chance! 50% off unlimited learning
Sale ends in
Create a DimReduc object
CreateDimReducObject(embeddings = new(Class = "matrix"),
loadings = new(Class = "matrix"), projected = new(Class = "matrix"),
assay = NULL, stdev = numeric(), key = NULL, jackstraw = NULL,
misc = list())
A matrix with the cell embeddings
A matrix with the feature loadings
A matrix with the projected feature loadings
Assay used to calculate this dimensional reduction
Standard deviation (if applicable) for the dimensional reduction
A character string to facilitate looking up features from a specific DimReduc
Results from the JackStraw function
list for the user to store any additional information associated with the dimensional reduction
# NOT RUN {
data <- GetAssayData(pbmc_small[["RNA"]], slot = "scale.data")
pcs <- prcomp(x = data)
pca.dr <- CreateDimReducObject(
embeddings = pcs$rotation,
loadings = pcs$x,
stdev = pcs$sdev,
key = "PC",
assay = "RNA"
)
# }
Run the code above in your browser using DataLab