% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-pcaRes.R
\docType{methods}
\name{R2VX,pcaRes-method}
\alias{R2VX,pcaRes-method}
\alias{R2VX}
\title{R2 goodness of fit}
\usage{
\S4method{R2VX}{pcaRes}(object, direction = c("variables",
  "observations", "complete"), data = completeObs(object),
  pcs = nP(object))
}
\arguments{
\item{object}{a PCA model object}

\item{direction}{choose between calculating R2 per variable, per
observation or for the entire data with 'variables',
'observations' or 'complete'.}

\item{data}{the data used to fit the model}

\item{pcs}{the number of PCs to use to calculate R2}
}
\value{
A vector with R2 values
}
\description{
Flexible calculation of R2 goodness of fit.
}
\examples{
R2VX(pca(iris))
}
\author{
Henning Redestig
}
