Learn R Programming

adaptiveGPCA (version 0.1.3)

gpca: gPCA

Description

Performs standard gPCA with k components on a data matrix X with row inner product Q and weights D.

Usage

gpca(X, Q, D = rep(1, nrow(X)), k)

Value

A list with variable loadings on the principal axes (QV), sample/row scores (U), the fraction of the variance explained by each of the axes (vars).

Arguments

X

A data matrix of size \(n \times p\).

Q

An inner product matrix for the rows, either as a \(p \times p\) matrix or an eigendecomposition of such a matrix.

D

Sample weights, a vector of length \(n\).

k

The number of components to return.

Examples

Run this code
data(AntibioticSmall)
out.gpca = gpca(AntibioticSmall$X, AntibioticSmall$Q, k = 2)

Run the code above in your browser using DataLab