Package: grafify 4.0.1

grafify: Easy Graphs for Data Visualisation and Linear Models for ANOVA

Easily explore data by plotting graphs with a few lines of code. Use these ggplot() wrappers to quickly draw graphs of scatter/dots with box-whiskers, violins or SD error bars, data distributions, before-after graphs, factorial ANOVA and more. Customise graphs in many ways, for example, by choosing from colour blind-friendly palettes (12 discreet, 3 continuous and 2 divergent palettes). Use the simple code for ANOVA as ordinary (lm()) or mixed-effects linear models (lmer()), including randomised-block or repeated-measures designs, and fit non-linear outcomes as a generalised additive model (gam) using mgcv(). Obtain estimated marginal means and perform post-hoc comparisons on fitted models (via emmeans()). Also includes small datasets for practising code and teaching basics before users move on to more complex designs. See vignettes for details on usage <https://grafify-vignettes.netlify.app/>. Citation: <doi:10.5281/zenodo.5136508>.

Authors:Avinash R Shenoy [cre, aut]

grafify_4.0.1.tar.gz
grafify_4.0.1.zip(r-4.5)grafify_4.0.1.zip(r-4.4)grafify_4.0.1.zip(r-4.3)
grafify_4.0.1.tgz(r-4.4-any)grafify_4.0.1.tgz(r-4.3-any)
grafify_4.0.1.tar.gz(r-4.5-noble)grafify_4.0.1.tar.gz(r-4.4-noble)
grafify_4.0.1.tgz(r-4.4-emscripten)grafify_4.0.1.tgz(r-4.3-emscripten)
grafify.pdf |grafify.html
grafify/json (API)
NEWS

# Install 'grafify' in R:
install.packages('grafify', repos = c('https://ashenoy-cmbi.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ashenoy-cmbi/grafify/issues

Datasets:
  • data_1w_death - In vitro experiments measuring percentage cell death in three genotypes of cells.
  • data_2w_Festing - Data from two-way ANOVA with randomised block design of treatments of strains of mice.
  • data_2w_Tdeath - In vitro measurement of percentage cell death - two-way ANOVA design with repeated measures, and randomised blocks.
  • data_cholesterol - Hierarchical data from 25 subjects either treated or not at 5 hospitals - two-way ANOVA design with repeated measures.
  • data_doubling_time - Doubling time of E.coli measured by 10 students three independent times.
  • data_t_pdiff - Matched data from two groups where difference between them is consistent.
  • data_t_pratio - Matched data from two groups where ratio between them is consistent.
  • data_zooplankton - Time-series data on zooplankton in lake Menon.

On CRAN:

ggplot2linear-modelspost-hoc-comparisonsstatisticsvignettes

59 exports 45 stars 3.07 score 97 dependencies 49 scripts 578 downloads

Last updated 7 months agofrom:c4fedc8ca6. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 23 2024
R-4.5-winNOTEAug 23 2024
R-4.5-linuxNOTEAug 23 2024
R-4.4-winNOTEAug 23 2024
R-4.4-macNOTEAug 23 2024
R-4.3-winNOTEAug 23 2024
R-4.3-macNOTEAug 23 2024

Exports:ga_anovaga_modelget_graf_coloursgraf_col_palettegraf_col_palette_defaultgraf_coloursgraf_palettesmake_1way_datamake_1way_rb_datamake_2way_datamake_2way_rb_datamixed_anovamixed_anova_slopesmixed_modelmixed_model_slopesplot_3d_point_sdplot_3d_scatterbarplot_3d_scatterboxplot_3d_scatterviolinplot_4d_point_sdplot_4d_scatterbarplot_4d_scatterboxplot_4d_scatterviolinplot_befafter_boxplot_befafter_colorsplot_befafter_coloursplot_befafter_shapesplot_densityplot_dotbar_sdplot_dotboxplot_dotviolinplot_gam_predictplot_grafify_paletteplot_histogramplot_lm_predictplot_logscaleplot_point_sdplot_qq_gamplot_qqlineplot_qqmodelplot_scatterbar_sdplot_scatterboxplot_scatterviolinplot_xy_CatGroupplot_xy_NumGroupposthoc_Levelwiseposthoc_Pairwiseposthoc_Trends_Levelwiseposthoc_Trends_Pairwiseposthoc_Trends_vsRefposthoc_vsRefscale_color_grafifyscale_colour_grafifyscale_fill_grafifysimple_anovasimple_modeltable_summarytable_x_reordertheme_grafify

Dependencies:abindbackportsbase64encbootbroombslibcachemcarcarDatacheckmatecliclustercolorspacecowplotcpp11data.tableDerivdigestdoBydplyremmeansestimabilityevaluatefansifarverfastmapfontawesomeforeignFormulafsgenericsggplot2gluegridExtragtablehighrHmischtmlTablehtmltoolshtmlwidgetsisobandjquerylibjsonliteknitrlabelinglatticelifecyclelme4lmerTestmagrittrMASSMatrixMatrixModelsmemoisemgcvmicrobenchmarkmimeminqamodelrmunsellmvtnormnlmenloptrnnetnumDerivpatchworkpbkrtestpillarpkgconfigpurrrquantregR6rappdirsRColorBrewerRcppRcppEigenrlangrmarkdownrpartrstudioapisassscalesSparseMstringistringrsurvivaltibbletidyrtidyselecttinytexutf8vctrsviridisviridisLitewithrxfunyaml

Readme and manuals

Help Manual

Help pageTopics
In vitro experiments measuring percentage cell death in three genotypes of cells.data_1w_death
Data from two-way ANOVA with randomised block design of treatments of strains of mice.data_2w_Festing
In vitro measurement of percentage cell death - two-way ANOVA design with repeated measures, and randomised blocks.data_2w_Tdeath
Hierarchical data from 25 subjects either treated or not at 5 hospitals - two-way ANOVA design with repeated measures.data_cholesterol
Doubling time of E.coli measured by 10 students three independent times.data_doubling_time
Matched data from two groups where difference between them is consistent.data_t_pdiff
Matched data from two groups where ratio between them is consistent.data_t_pratio
Time-series data on zooplankton in lake Menon.data_zooplankton
ANOVA table from a generalised additive model ('gam')ga_anova
Fit a generalised additive model ('gam')ga_model
Get graf internalget_graf_colours
Call 'grafify' palettes for scale & fill functionsgraf_col_palette
Call 'grafify' palettes for scale & fill functionsgraf_col_palette_default
List of hexcodes of colours in grafify palettesgraf_colours
List of palettes available in grafify packagegraf_palettes
Make one-way or two-way independent group or randomised block design data.make_1way_data
Make one-way or two-way independent group or randomised block design data.make_1way_rb_data
Make one-way or two-way independent group or randomised block design data.make_2way_data
Make one-way or two-way independent group or randomised block design data.make_2way_rb_data
ANOVA table from linear mixed effects analysis.mixed_anova
ANOVA table from linear mixed effects analysis.mixed_anova_slopes
Model from a linear mixed effects modelmixed_model
Model from a linear mixed effects model with varying slopesmixed_model_slopes
Plot of mean & error bars for 1-way ANOVAs with matched shapes mapped to blocking factor.plot_3d_point_sd
Plot a bar graph for 1-way ANOVAs with matched shapes mapped to blocking factor.plot_3d_scatterbar
Plot a scatter and box plot for 1-way ANOVAs with matched shapes mapped to blocking factor.plot_3d_scatterbox
Plot a scatter with violin & box plot for 1-way ANOVAs with matched shapes mapped to blocking factor.plot_3d_scatterviolin
Plot mean & error bars for 2-way ANOVAs with or without a blocking factor.plot_4d_point_sd
Plot scatter plot with bar & error bars for 2-way ANOVAs with or without a blocking factor.plot_4d_scatterbar
Plot scatter, box & whiskers for 2-way ANOVAs with or without a blocking factor.plot_4d_scatterbox
Plot scatter, box & violin for 2-way ANOVAs with or without a blocking factor.plot_4d_scatterviolin
Before-after style graph with a boxplotplot_befafter_box
Plot a before-after plot with lines joining colour-matched symbols.plot_befafter_colors plot_befafter_colours
Plot a before-after plot with lines joining shape-matched symbols.plot_befafter_shapes
Plot density distribution of data.plot_density
Plot a dotplot on a bar graph with SD error bars with two variables.plot_dotbar_sd
Plot a dotplot on a boxplot with two variables.plot_dotbox
Plot a dotplot on a violin plot with two variables.plot_dotviolin
Plot prediction of 'gam' modelplot_gam_predict
See grafify colour palettesplot_grafify_palette
Plot data distribution as histograms.plot_histogram
Plot data and predictions from linear modelplot_lm_predict
Add log transformations to graphsplot_logscale
Plot a point as mean with SD error bars using two variables.plot_point_sd
Plot model diagnostics for generalised additive modelsplot_qq_gam
Plot quantile-quantile (QQ) graphs from data.plot_qqline
Plot quantile-quantile (QQ) graphs from residuals of linear models.plot_qqmodel
Plot scatter dots on a bar graph with SD error bars with two variables.plot_scatterbar_sd
Plot a scatter plot on a boxplot with two variables.plot_scatterbox
Plot a scatter plot on a violin plot with two variables.plot_scatterviolin
Plot points on a quantitative X - Y plot & a categorical grouping variable.plot_xy_CatGroup
Plot points on a quantitative X - Y plot & a numeric grouping variable.plot_xy_NumGroup
Level-wise post-hoc comparisons from a linear or linear mixed effects model.posthoc_Levelwise
Pairwise post-hoc comparisons from a linear or linear mixed effects model.posthoc_Pairwise
Use emtrends to get level-wise comparison of slopes from a linear model.posthoc_Trends_Levelwise
Use emtrends to get pairwise comparison of slopes from a linear model.posthoc_Trends_Pairwise
Use emtrends to get level-wise comparison of slopes from a linear model.posthoc_Trends_vsRef
Post-hoc comparisons to a control or reference group.posthoc_vsRef
'scale_colour_' and 'scale_fill_' functionsscale_color_grafify scale_colour_grafify
'scale_colour_' and 'scale_fill_' functionsscale_fill_grafify
ANOVA table from a linear model fit to data.simple_anova
Model from a linear model fit to data.simple_model
Get numeric summary grouped by factorstable_summary
Reordering groups along X-axistable_x_reorder
A modified 'theme_classic()' for 'grafify'-like graphs.theme_grafify