tblPCALoadings {MatrixQCvis} | R Documentation

## Return tibble with PCA loadings for features

### Description

The function 'tblPCALoadings' returns a 'tibble' with loadings values for the features (row entries) in 'x'.

### Usage

    tblPCALoadings(x, params)

### Arguments

`x` | 'matrix', containing no missing values
`params` | 'list', arguments/parameters given to the function 'stats::prcomp'

### Details

The function 'tblPCALoadings' acccesses the list entry 'rotation' of the 'prcomp' object.

### Value

'tbl'

### Author(s)

Thomas Naake

### Examples

    set.seed(1)
    x <- matrix(rnorm(1:10000), ncol = 100)
    rownames(x) <- paste("feature", 1:nrow(x))
    colnames(x) <- paste("sample", 1:ncol(x))
    params <- list(method = "euclidean", ## dist
        initial_dims = 10, max_iter = 100, dims = 3, perplexity = 3, ## tSNE
        min_dist = 0.1, n_neighbors = 15, spread = 1) ## UMAP
    tblPCALoadings(x, params)

[Package MatrixQCvis version 1.0.0 Index]