Learn R Programming

SeuratObject (version 4.0.1)

Loadings: Get and set feature loadings

Description

Get and set feature loadings

Usage

Loadings(object, ...)

Loadings(object, ...) <- value

# S3 method for DimReduc Loadings(object, projected = FALSE, ...)

# S3 method for DimReduc Loadings(object, projected = TRUE, ...) <- value

# S3 method for Seurat Loadings(object, reduction = "pca", projected = FALSE, ...)

Arguments

object

An object

...

Arguments passed to other methods

value

Feature loadings to add

projected

Pull the projected feature loadings?

reduction

Name of reduction to pull feature loadings for

Value

Loadings: the feature loadings for object

Loadings<-: object with the updated loadings

Examples

Run this code
# NOT RUN {
# Get the feature loadings for a given DimReduc
Loadings(object = pbmc_small[["pca"]])[1:5,1:5]

# Set the feature loadings for a given DimReduc
new.loadings <- Loadings(object = pbmc_small[["pca"]])
new.loadings <- new.loadings + 0.01
Loadings(object = pbmc_small[["pca"]]) <- new.loadings

# Get the feature loadings for a specified DimReduc in a Seurat object
Loadings(object = pbmc_small, reduction = "pca")[1:5,1:5]

# }

Run the code above in your browser using DataLab