powered by
stats::prcomp
stats::princomp
data.frame
Convert stats::prcomp, stats::princomp to data.frame
# S3 method for prcomp fortify(model, data = NULL, ...)
stats::prcomp or stats::princomp instance
original dataset, if needed
other arguments passed to methods
if (FALSE) { fortify(stats::prcomp(iris[-5])) fortify(stats::prcomp(iris[-5]), data = iris) fortify(stats::princomp(iris[-5])) fortify(stats::princomp(iris[-5]), data = iris) }
Run the code above in your browser using DataLab