Learn R Programming

⚠️There's a newer version (2.8.16) of this package.Take me there.

sjPlot - Data Visualization for Statistics in Social Science

Collection of plotting and table output functions for data visualization. Results of various statistical analyses (that are commonly used in social sciences) can be visualized using this package, including simple and cross tabulated frequencies, histograms, box plots, (generalized) linear models, mixed effects models, PCA and correlation matrices, cluster analyses, scatter plots, Likert scales, effects plots of interaction terms in regression models, constructing index or score variables and much more.

Installation

Latest development build

To install the latest development snapshot (see latest changes below), type following commands into the R console:

library(devtools)
devtools::install_github("strengejacke/sjPlot")

Please note the package dependencies when installing from GitHub. The GitHub version of this package may depend on latest GitHub versions of my other packages, so you may need to install those first, if you encounter any problems. Here's the order for installing packages from GitHub:

sjlabelledsjmiscsjstatsggeffectssjPlot

Officiale, stable release

     

To install the latest stable release from CRAN, type following command into the R console:

install.packages("sjPlot")

Documentation and examples

Please visit https://strengejacke.github.io/sjPlot/ for documentation and vignettes.

Citation

In case you want / have to cite my package, please use citation('sjPlot') for citation information. Since core functionality of package depends on the ggplot-package, consider citing this package as well.

Copy Link

Version

Install

install.packages('sjPlot')

Monthly Downloads

35,447

Version

2.6.1

License

GPL-3

Maintainer

Last Published

October 14th, 2018

Functions in sjPlot (2.6.1)

plot_residuals

Plot predicted values and their residuals
plot_grid

Arrange list of plots as grid
sjt.fa

Summary of factor analysis as HTML table
sjp.corr

Plot correlation matrix
sjPlot-package

Data Visualization for Statistics in Social Science
sjp.chi2

Plot Pearson's Chi2-Test of multiple contingency tables
sjt.glm

Summary of generalized linear models as HTML table
set_theme

Set global theme options for sjp-functions
sjc.grpdisc

Compute a linear discriminant analysis on classified cluster groups
plot_scatter

Plot (grouped) scatter plots
sjt.pca

Summary of principal component analysis as HTML table
sjc.kgap

Compute gap statistics for k-means-cluster
sjt.stackfrq

Summary of stacked frequencies as HTML table
plot_likert

Plot likert scales as centered stacked bars
save_plot

Save ggplot-figure for print publication
sjc.dend

Compute hierarchical cluster analysis and visualize group classification
sjp.xtab

Plot contingency tables
sjplot

Wrapper to create plots and tables within a pipe-workflow
sjp.stackfrq

Plot stacked proportional bars
sjc.qclus

Compute quick cluster analysis
sjt.corr

Summary of correlations as HTML table
sjPlot-themes

Modify plot appearance
sjc.elbow

Compute elbow values of a k-means cluster analysis
sjp.fa

Plot FA results
sjp.aov1

Plot One-Way-Anova tables
sjp.frq

Plot frequencies of variables
sjc.cluster

Compute hierarchical or kmeans cluster analysis
sjp.grpfrq

Plot grouped or stacked frequencies
sjp.pca

Plot PCA results
tab_model

Print regression models as HTML table
sjp.kfold_cv

Plot model fit from k-fold cross-validation
sjt.itemanalysis

Summary of item analysis of an item scale as HTML table
sjt.glmer

Summary of generalized linear mixed models as HTML table
sjp.poly

Plot polynomials for (generalized) linear regression
view_df

View structure of labelled data frames
sjt.xtab

Summary of contingency tables as HTML table
sjt.lm

Summary of linear regression as HTML table
tab_df

Print data frames as HTML table.
sjt.lmer

Summary of linear mixed effects models as HTML table
dist_f

Plot F distributions
plot_models

Forest plot of multiple regression models
plot_model

Plot regression models
dist_chisq

Plot chi-squared distributions
dist_norm

Plot normal distributions
plot_gpt

Plot grouped proportional tables
dist_t

Plot t-distributions
efc

Sample dataset from the EUROFAMCARE project
reexports

Objects exported from other packages