|
| 1 | +**Note**: This package has been maintained by [@terrytangyuan](https://github.com/terrytangyuan) since 2015. Please [consider sponsoring](https://github.com/sponsors/terrytangyuan)! |
| 2 | + |
| 3 | +[](https://CRAN.R-project.org/package=ggfortify) |
| 4 | +[](https://CRAN.R-project.org/package=ggfortify) |
| 5 | + |
| 6 | +# ggfortify |
| 7 | + |
| 8 | +This package offers ``fortify`` and ``autoplot`` functions to allow automatic ``ggplot2`` to visualize statistical result of popular R packages. Check out our [R Journal paper] (https://journal.r-project.org/archive/2016-2/tang-horikoshi-li.pdf) for more details on the overall architecture design and a gallery of visualizations created with this package. Also check out [autoplotly package](https://github.com/terrytangyuan/autoplotly) that could automatically generate interactive visualizations with [plotly.js](https://plot.ly/) style based on ``ggfortify``. The generated visualizations can also be easily extended using ``ggplot2`` syntax while staying interactive. |
| 9 | + |
| 10 | + |
| 11 | +## Installation |
| 12 | + |
| 13 | +- Install the latest stable release from CRAN: |
| 14 | +``` |
| 15 | +install.packages('ggfortify') |
| 16 | +``` |
| 17 | + |
| 18 | +- Install the development version from Github: |
| 19 | +``` |
| 20 | +if (!require("remotes")) install.packages("remotes") |
| 21 | + remotes::install_github('sinhrks/ggfortify') |
| 22 | +``` |
| 23 | + |
| 24 | +## Examples |
| 25 | + |
| 26 | +* [Concepts and Basics of ggfortify](https://cran.r-project.org/web/packages/ggfortify/vignettes/basics.html) |
| 27 | +* [Plotting Diagnostics for LM and GLM with ggplot2 and ggfortify](https://cran.r-project.org/web/packages/ggfortify/vignettes/plot_lm.html) |
| 28 | +* [Plotting Time Series with ggplot2 and ggfortify](https://cran.r-project.org/web/packages/ggfortify/vignettes/plot_ts.html) |
| 29 | +* [Plotting PCA, clustering, LFDA and MDS](https://cran.r-project.org/web/packages/ggfortify/vignettes/plot_pca.html) |
| 30 | +* [Plotting Survival Curves using ggplot2 and ggfortify](https://cran.r-project.org/web/packages/ggfortify/vignettes/plot_surv.html) |
| 31 | +* [Plotting Probability Distributions with ggplot2 and ggfortify](https://cran.r-project.org/web/packages/ggfortify/vignettes/plot_dist.html) |
| 32 | +* [Automatic Generation of Interactive Visualizations in ggplot2 and plotly Styles](https://terrytangyuan.github.io/2018/02/12/autoplotly-intro/) |
| 33 | +* [一行R代码实现繁琐的可视化](http://terrytangyuan.github.io/2015/11/24/ggfortify-intro/) |
| 34 | + |
| 35 | +## Reference/Citation |
| 36 | + |
| 37 | +To cite ggfortify in publications, please use (available via ``citation("ggfortify")``): |
| 38 | +``` |
| 39 | + Yuan Tang, Masaaki Horikoshi, and Wenxuan Li (2016). ggfortify: Unified Interface to Visualize |
| 40 | + Statistical Result of Popular R Packages. The R Journal, 8.2, 478-489. |
| 41 | +
|
| 42 | + Masaaki Horikoshi and Yuan Tang (2016). ggfortify: Data Visualization Tools for Statistical |
| 43 | + Analysis Results. https://CRAN.R-project.org/package=ggfortify |
| 44 | +``` |
| 45 | + |
| 46 | +## Coverage |
| 47 | + |
| 48 | +This covers following classes: |
| 49 | + |
| 50 | +- ``base::matrix`` |
| 51 | +- ``base::table`` (supports ``fortify`` only) |
| 52 | +- ``cluster::clara`` |
| 53 | +- ``cluster::fanny`` |
| 54 | +- ``cluster::pam`` |
| 55 | +- ``cluster::silhouette`` |
| 56 | +- ``changepoint::cpt`` |
| 57 | +- ``fGarch::fGARCH`` |
| 58 | +- ``forecast::bats`` |
| 59 | +- ``forecast::forecast`` |
| 60 | +- ``forecast::ets`` |
| 61 | +- ``forecast::nnetar`` |
| 62 | +- ``fracdiff::fracdiff`` |
| 63 | +- ``glmnet::cv.glmnet`` |
| 64 | +- ``glmnet::glmnet`` |
| 65 | +- ``KFAS::KFS`` |
| 66 | +- ``KFAS::signal`` (inference) |
| 67 | +- ``lfda::lfda`` |
| 68 | +- ``lfda::klfda`` |
| 69 | +- ``lfda::self`` |
| 70 | +- ``maps::map`` |
| 71 | +- ``MASS::isoMDS`` (inference) |
| 72 | +- ``MASS::sammon`` (inference) |
| 73 | +- ``raster::RasterBrick`` |
| 74 | +- ``raster::RasterCommon`` |
| 75 | +- ``raster::RasterLayer`` |
| 76 | +- ``raster::RasterStack`` |
| 77 | +- ``ROCR::performance`` |
| 78 | +- ``sp::Line`` |
| 79 | +- ``sp::Lines`` |
| 80 | +- ``sp::Polygon`` |
| 81 | +- ``sp::Polygons`` |
| 82 | +- ``sp::SpatialLines`` |
| 83 | +- ``sp::SpatialLinesDataFrame`` |
| 84 | +- ``sp::SpatialPoints`` |
| 85 | +- ``sp::SpatialPointsDataFrame`` |
| 86 | +- ``sp::SpatialPolygons`` |
| 87 | +- ``sp::SpatialPolygonsDataFrame`` |
| 88 | +- ``splines::basis`` |
| 89 | +- ``stats::acf`` |
| 90 | +- ``stats::ar`` |
| 91 | +- ``stats::Arima`` |
| 92 | +- ``stats::cmdscale`` (inference) |
| 93 | +- ``stats::decomposed.ts`` |
| 94 | +- ``stats::density`` |
| 95 | +- ``stats::factanal`` |
| 96 | +- ``stats::glm`` |
| 97 | +- ``stats::HoltWinters`` |
| 98 | +- ``stats::kmeans`` |
| 99 | +- ``stats::lm`` |
| 100 | +- ``stats::prcomp`` |
| 101 | +- ``stats::princomp`` |
| 102 | +- ``stats::spec`` |
| 103 | +- ``stats::stepfun`` |
| 104 | +- ``stats::stl`` |
| 105 | +- ``stats::ts`` |
| 106 | +- ``survival::survfit`` |
| 107 | +- ``survival::survfit.cox`` |
| 108 | +- ``survival::survfitms`` |
| 109 | +- ``strucchange::breakpoints`` |
| 110 | +- ``strucchange::breakpointsfull`` |
| 111 | +- ``timeSeries::timeSeries`` |
| 112 | +- ``tseries::irts`` |
| 113 | +- ``vars::varprd`` |
| 114 | +- ``xts::xts`` |
| 115 | +- ``zoo::zooreg`` |
| 116 | + |
| 117 | +## Helper Functions |
| 118 | + |
| 119 | +- ``ggdistribution`` to plot PDF/CDF |
| 120 | +- ``ggcpgram`` to plot ``cpgram`` |
| 121 | +- ``ggtsdiag`` to plot ``tsdiag`` |
| 122 | +- ``ggfreqplot`` to generalize ``monthplot`` |
0 commit comments