1
0
mirror of https://github.com/msberends/AMR.git synced 2025-12-15 09:10:25 +01:00

(v1.0.1.9002) PCA unit tests

This commit is contained in:
2020-03-08 11:18:59 +01:00
parent 9fc858f208
commit 77656a676c
20 changed files with 182 additions and 135 deletions

View File

@@ -1,11 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pca.R
\name{prcomp.data.frame}
\alias{prcomp.data.frame}
\name{pca}
\alias{pca}
\title{Principal Component Analysis (for AMR)}
\usage{
\method{prcomp}{data.frame}(
pca(
x,
...,
retx = TRUE,
@@ -14,8 +13,6 @@
tol = NULL,
rank. = NULL
)
pca(x, ...)
}
\arguments{
\item{x}{a \link{data.frame} containing numeric columns}
@@ -51,13 +48,16 @@ pca(x, ...)
alternative or in addition to \code{tol}, useful notably when the
desired rank is considerably smaller than the dimensions of the matrix.}
}
\value{
An object of classes \link{pca} and \link{prcomp}
}
\description{
Performs a principal component analysis (PCA) based on a data set with automatic determination for afterwards plotting the groups and labels.
Performs a principal component analysis (PCA) based on a data set with automatic determination for afterwards plotting the groups and labels, and automatic filtering on only suitable (i.e. non-empty and numeric) variables.
}
\details{
The \code{\link[=pca]{pca()}} function takes a \link{data.frame} as input and performs the actual PCA with the R function \code{\link[=prcomp]{prcomp()}}.
The \code{\link[=pca]{pca()}} function takes a \link{data.frame} as input and performs the actual PCA with the \R function \code{\link[=prcomp]{prcomp()}}.
The result of the \code{\link[=pca]{pca()}} function is a \code{\link{prcomp}} object, with an additional attribute \code{non_numeric_cols} which is a vector with the column names of all columns that do not contain numeric values. These are probably the groups and labels, and will be used by \code{\link[=ggplot_pca]{ggplot_pca()}}.
The result of the \code{\link[=pca]{pca()}} function is a \link{prcomp} object, with an additional attribute \code{non_numeric_cols} which is a vector with the column names of all columns that do not contain numeric values. These are probably the groups and labels, and will be used by \code{\link[=ggplot_pca]{ggplot_pca()}}.
}
\section{Experimental lifecycle}{