Define fortify and autoplot functions to allow ggplot2 to handle some popular R packages.
Note: For functions which returns list, ggfortify tries to infer a background class using its attribute names. Such functions are marked as "(inference)".
Install the latest stable release from CRAN:
install.packages('ggfortify')Install the development version from Github:
library(devtools) install_github('sinhrks/ggfortify')
If you use this package, please cite our paper to appear in R Journal soon.
This covers following classes:
base::matrixbase::table(supportsfortifyonly)cluster::claracluster::fannycluster::pamchangepoint::cptdlm::dlmFilterdlm::dlmSmooth(inference)fGarch::fGARCHforecast::batsforecast::forecastforecast::etsforecast::nnetarfracdiff::fracdiffglmnet::cv.glmnetglmnet::glmnetKFAS::KFSKFAS::signal(inference)lfda::lfdalfda::klfdalfda::selfmaps::mapMASS::isoMDS(inference)MASS::sammon(inference)raster::RasterBrickraster::RasterCommonraster::RasterLayerraster::RasterStacksp::Linesp::Linessp::Polygonsp::Polygonssp::SpatialLinessp::SpatialLinesDataFramesp::SpatialPointssp::SpatialPointsDataFramesp::SpatialPolygonssp::SpatialPolygonsDataFramesplines::basisstats::acfstats::arstats::Arimastats::cmdscale(inference)stats::decomposed.tsstats::densitystats::factanalstats::glmstats::HoltWintersstats::kmeansstats::lmstats::prcompstats::princompstats::specstats::stepfunstats::stlstats::tssurvival::survfitsurvival::survfit.coxstrucchange::breakpointsstrucchange::breakpointsfulltimeSeries::timeSeriestseries::irtsvars::varprdxts::xtszoo::zooreg
ggdistributionto plot PDF/CDFggcpgramto plotcpgramgglagplotto plotlag.plotggtsdiagto plottsdiagggfreqplotto generalizemonthplot
- Concepts and Basics of ggfortify
- Plotting Diagnostics for LM and GLM with ggplot2 and ggfortify
- Plotting Time Series with ggplot2 and ggfortify
- Plotting PCA, clustering, LFDA and MDS
- Plotting Survival Curves using ggplot2 and ggfortify
- Plotting Probability Distributions with ggplot2 and ggfortify
- One Line of Code to ggplot2 Popular R Packages (Chinese)
There are some useful plotting packages using ggplot2. ggfortify will not focus on area already covered by these packages.