Skip to content

Analysis of Factorial Experiments

10packages dependsuggested by 18
338.9Kdownloads / year
78.5%test coverage
8/13flavors OK

Overview

About

Convenience functions for analyzing factorial experiments using ANOVA or mixed models. aov_ez(), aov_car(), and aov_4() allow specification of between, within (i.e., repeated-measures), or mixed (i.e., split-plot) ANOVAs for data in long format (i.e., one observation per row), automatically aggregating multiple observations per individual and cell of the design. mixed() fits mixed models using lme4::lmer() and computes p-values for all fixed effects using either Kenward-Roger or Satterthwaite approximation for degrees of freedom (LMM only), parametric bootstrap (LMMs and GLMMs), or likelihood ratio tests (LMMs and GLMMs). afex_plot() provides a high-level interface for interaction or one-way plots using ggplot2, combining raw data and model estimates. afex uses type 3 sums of squares as default (imitating commercial statistical software).

Install

Health

CRAN checks
5NOTE8OK
Check messages
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names:
  afex/tests/testthat/test-aov_car-basic.R (.Names: 2)
'.Names' should be changed to 'names'.
NOTEdependencies in R coder-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64

r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Base package in Suggests/Enhances imported in NAMESPACE:
  ‘parallel’

r-devel-windows-x86_64

Base package in Suggests/Enhances imported in NAMESPACE:
  'parallel'

CRAN check page ↗

Slowest check: 7.7 min · r-oldrel-windows-x86_64
Status changes
  • NOTE8 OK, 5 NOTE2026-09-08
  • ERROR8 OK, 4 NOTE, 1 ERROR2026-09-07
  • NOTE10 OK, 3 NOTE2026-07-16
  • OK13 OK2026-07-13
  • ERROR12 OK, 1 ERROR2026-07-11
Show 3 earlier changesHide 3 earlier changes
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.5-1
READMEYes · 1,627 wordsVignettesYes · 7 · dynamicNEWSYes · 0% structuredCitation fileNoWebsiteYes
Help pages
26 (2 internal)includes a package overview page
Examples that run
100%19 run in a plain check (1 of them under a condition)
Exported functions with examples
73%
Documented parameters
80%
Return-value docs
82%
Help pages citing references
19%

Downloads

338.9K
CRAN downloads in the past year
Rank #741 · ~928/day · ~28.2K/mo
Daily download trend is not available in this view yet.
24.7K30 days
68.5K90 days
338.9K1 year
Compare downloads with other packages →
Also on3.9K r2u141 autocran6.5K conda_forge137 c2d4u

Repository

132Stars
30Forks
19Open issues
1Open PRs
0Releases
680Commits
16Commit identities
680 commits · Last activity 2025-12-14 · +0.8% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
82%
Median days to close, 50 most recently updated closed issues
16
Median days to close, 50 most recently updated closed PRs
2

Stars over time

2025-10-14 · 1272026-09-29 · 132
PracticesBeta

7 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/singmann/afex on 2026-10-11.

Continuous integration (1)
GitHub Actions
Governance and community (1)
Code of conduct
Docs source (2)
README.Rmd

GitHub Pages site last deployed 2025-12-14

Lint, format, editor (3)
AirVS CodeRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
43 external dependencies (excludes base and recommended)

Installing afex adds 63 packages (34 with compiled code, 55 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.

Depends (2)
R >= 3.5.0lme4
Imports (9)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
10direct
8indirect
Depends 1 · Imports 9
Suggested by 18
Show all 28 packagesHide all 28 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (12)
Author, Maintainer since 0.2-26 (2012)
Author · added in 0.15-2
Author · added in 0.24-1
Author · added in 0.14-2
Author · added in 0.14-2
Contributor · added in 0.14-2
Contributor · added in 0.20-2
Contributor · added in 0.14-2
Contributor · added in 0.14-2
Contributor · added in 0.20-2
Contributor · added in 0.20-2
Contributor · added in 0.14-2
Listed in earlier versions (1)
Jonathan Love
no longer listed · 0.17-8 to 0.19-1
Releases (39)

Pick two releases to compare their code metrics.

Show 38 earlier eventsHide 38 earlier events
  • R
    R 4.1.0 released · 2021-05-18
  • 0.28-1
    record
    2021-01-12 · diff ↗
  • 0.28-0
    record
    2020-09-20 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.27-2
    record
    2020-03-28 · diff ↗ ·
    added 1 export
    round_ps_apa
  • 0.26-0
    record
    2020-01-16 · diff ↗
  • 0.25-1
    record
    2019-08-27 · diff ↗
  • 0.24-1
    record
    2019-07-03 · diff ↗ ·
    added 2 exports
    test_levene, test_sphericity
  • R
    R 3.6.0 released · 2019-04-26
  • 0.23-0
    record
    2019-02-19 · diff ↗
  • 0.22-1
    record
    2018-09-24 · diff ↗ ·
    added 3 exports
    afex_plot, interaction_plot, oneway_plot
  • 0.21-2
    record
    2018-06-24 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.20-2
    record
    2018-04-04 · diff ↗
  • 0.19-1
    record
    2018-01-08 · diff ↗
  • 0.18-0
    record
    2017-05-26 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 0.17-8
    record
    2017-04-13 · diff ↗ ·
    removed 1 export
    allFit
    added 3 exports
    all_fit, lmer, nmkbw
  • R
    R 3.3.0 released · 2016-05-03
  • 0.16-1
    record
    2016-04-04 · diff ↗
  • 0.15-2
    record
    2015-10-25 · diff ↗
  • 0.14-2
    record
    2015-08-17 · diff ↗ ·
    removed 2 exports
    nice.anova, univ
    added 6 exports
    afex_options, aov_4, aov_car, aov_ez, lmer_alt, nice
  • R
    R 3.2.0 released · 2015-04-16
  • 0.13-145
    record
    2015-01-12 · diff ↗ ·
    added 1 export
    ems
  • 0.12-135
    record
    2014-11-03 · diff ↗
  • 0.11-131
    record
    2014-10-12 · diff ↗ ·
    added 1 export
    allFit
  • 0.10-113
    record
    2014-08-05 · diff ↗ ·
    added 5 exports
    set_default_contrasts, set_deviation_contrasts, set_effects_contrasts, set_sum_contrasts, set_treatment_contrasts
  • 0.9-109
    record
    2014-04-24 · diff ↗ ·
    added 1 export
    aov4
  • R
    R 3.1.0 released · 2014-04-10
  • 0.8-94
    record
    2014-02-23 · diff ↗ ·
    added 1 export
    round_ps
  • 0.7-90
    record
    2013-12-04 · diff ↗
  • 0.6-82
    record
    2013-09-26 · diff ↗
  • 0.5-71
    record
    2013-05-29 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • 0.4-57
    record
    2013-02-11 · diff ↗ ·
    removed 1 export
    .Last.lib
  • 0.3-42
    record
    2012-09-17 · diff ↗ ·
    removed 1 export
    univariate
    added 2 exports
    compare.2.vectors, univ
  • 0.2-26
    record
    2012-08-09
  • R
    R 2.15.0 released · 2012-03-30

Package metadata

First published
2012-08-09
Total releases
39 / 14 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.5.0
Bundled data
389 KB / 11 files
Download size
4.2 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("afex")
Singmann, H., Aust, F., Ben-Shachar, M. S., Bolker, B., Fox, J., Haubo Bojesen Christensen, R., Højsgaard, S., Lawrence, M. A., Lenth, R., Love, J., Mertens, U., & Westfall, J. (2025). afex: Analysis of Factorial Experiments (Version 1.5-1) [Computer software]. https://doi.org/10.32614/CRAN.package.afex

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for afex version 1.5-1 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy