Need help with ggfortify?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

sinhrks
448 Stars 60 Forks 384 Commits 16 Opened issues

Description

Define fortify and autoplot functions to allow ggplot2 to handle some popular R packages.

Services available

!
?

Need anything else?

Contributors list

.. image:: https://travis-ci.org/sinhrks/ggfortify.svg?branch=master :target: https://travis-ci.org/sinhrks/ggfortify .. image:: http://www.r-pkg.org/badges/version/ggfortify :target: https://CRAN.R-project.org/package=ggfortify .. image:: https://cranlogs.r-pkg.org/badges/grand-total/ggfortify :target: https://CRAN.R-project.org/package=ggfortify .. image:: https://coveralls.io/repos/sinhrks/ggfortify/badge.svg?branch=master&service=github :target: https://coveralls.io/github/sinhrks/ggfortify?branch=master .. image:: https://img.shields.io/badge/stackoverflow-ggfortify-green.svg :target: https://stackoverflow.com/questions/tagged/ggfortify

ggfortify

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 
_ for more details on the architecture. There's also
autoplotly package 
_ that could automatically generate interactive visualizations with
plotly.js 
_ style.

Note: For functions which returns

list
,
ggfortify
tries to infer a background class using its attribute names. Such functions are marked as "(inference)".

Installation

  • Install the latest stable release from CRAN: ::

    install.packages('ggfortify')

  • Install the development version from Github: ::

    if (!require("remotes")) install.packages("remotes") remotes::install_github('sinhrks/ggfortify')

Examples

  • 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 
    _
  • Automatic Generation of Interactive Visualizations in ggplot2 and plotly Styles 
    _
  • 一行R代码实现繁琐的可视化 
    _

Reference/Citation

To cite ggfortify in publications, please use (available via

citation("ggfortify")
):

Yuan Tang, Masaaki Horikoshi, and Wenxuan Li (2016). ggfortify: Unified Interface to Visualize Statistical Result of Popular R Packages. The R Journal, 8.2, 478-489.

Masaaki Horikoshi and Yuan Tang (2016). ggfortify: Data Visualization Tools for Statistical Analysis Results. https://CRAN.R-project.org/package=ggfortify

Coverage

This covers following classes:

  • base::matrix
  • base::table
    (supports
    fortify
    only)
  • cluster::clara
  • cluster::fanny
  • cluster::pam
  • cluster::silhouette
  • changepoint::cpt
  • dlm::dlmFilter
  • dlm::dlmSmooth
    (inference)
  • fGarch::fGARCH
  • forecast::bats
  • forecast::forecast
  • forecast::ets
  • forecast::nnetar
  • fracdiff::fracdiff
  • glmnet::cv.glmnet
  • glmnet::glmnet
  • KFAS::KFS
  • KFAS::signal
    (inference)
  • lfda::lfda
  • lfda::klfda
  • lfda::self
  • maps::map
  • MASS::isoMDS
    (inference)
  • MASS::sammon
    (inference)
  • raster::RasterBrick
  • raster::RasterCommon
  • raster::RasterLayer
  • raster::RasterStack
  • ROCR::performance
  • sp::Line
  • sp::Lines
  • sp::Polygon
  • sp::Polygons
  • sp::SpatialLines
  • sp::SpatialLinesDataFrame
  • sp::SpatialPoints
  • sp::SpatialPointsDataFrame
  • sp::SpatialPolygons
  • sp::SpatialPolygonsDataFrame
  • splines::basis
  • stats::acf
  • stats::ar
  • stats::Arima
  • stats::cmdscale
    (inference)
  • stats::decomposed.ts
  • stats::density
  • stats::factanal
  • stats::glm
  • stats::HoltWinters
  • stats::kmeans
  • stats::lm
  • stats::prcomp
  • stats::princomp
  • stats::spec
  • stats::stepfun
  • stats::stl
  • stats::ts
  • survival::survfit
  • survival::survfit.cox
  • survival::survfitms
  • strucchange::breakpoints
  • strucchange::breakpointsfull
  • timeSeries::timeSeries
  • tseries::irts
  • vars::varprd
  • xts::xts
  • zoo::zooreg

Helper Functions

  • ggdistribution
    to plot PDF/CDF
  • ggcpgram
    to plot
    cpgram
  • ggtsdiag
    to plot
    tsdiag
  • ggfreqplot
    to generalize
    monthplot

ggplot2 Families

There are some useful plotting packages using ggplot2.

ggfortify
will not focus on area already covered by these packages.
  • GGally 
    _
  • dendextend:ggdend 
    _
  • ggRandomForests 
    _
  • ggmcmc 
    _

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.