Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Loadings

Get and set feature loadings


Description

Get and set feature loadings

Usage

Loadings(object, ...)

Loadings(object, ...) <- value

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

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

## S3 method for class '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

# 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]

SeuratObject

Data Structures for Single Cell Data

v4.0.1
GPL-3
Authors
Rahul Satija [aut] (<https://orcid.org/0000-0001-9448-8833>), Andrew Butler [aut] (<https://orcid.org/0000-0003-3608-0463>), Paul Hoffman [aut, cre] (<https://orcid.org/0000-0002-7693-8957>), Tim Stuart [aut] (<https://orcid.org/0000-0002-3044-0897>), Jeff Farrell [ctb], Shiwei Zheng [ctb] (<https://orcid.org/0000-0001-6682-6743>), Christoph Hafemeister [ctb] (<https://orcid.org/0000-0001-6365-8254>), Patrick Roelli [ctb], Yuhan Hao [ctb] (<https://orcid.org/0000-0002-1810-0822>)
Initial release
2021-05-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.