fortify.prcomp {ggfortify}R Documentation

Convert stats::prcomp, stats::princomp to data.frame

Description

Convert stats::prcomp, stats::princomp to data.frame

Usage

## S3 method for class 'prcomp'
fortify(model, data = NULL, ...)

Arguments

model

stats::prcomp or stats::princomp instance

data

original dataset, if needed

...

other arguments passed to methods

Value

data.frame

Examples

## Not run: 
fortify(stats::prcomp(iris[-5]))
fortify(stats::prcomp(iris[-5]), data = iris)

fortify(stats::princomp(iris[-5]))
fortify(stats::princomp(iris[-5]), data = iris)

## End(Not run)

[Package ggfortify version 0.4.17 Index]