aStat manual Open aStat

Charts and R scripts

Charts

Most analyses draw a chart with R's ggplot2. Under the chart you can change:

Press Update chart to redraw it. Every setting becomes a line in the R script, so the chart in your exported script matches the one on screen. To save a picture, press Download chart (PNG).

Bars show the mean ± one standard error for measurements, and the estimate with its confidence interval for yes/no, count, and score models.

The R script

Open Show the script to see the exact R code aStat ran. The script it shows is the script it ran: aStat adds only a separate step that collects the results for the screen, and that step never changes a number.

The script:

Re-running the script in R

  1. Install R (4.3 or later) and, if you like, RStudio.
  2. Press Download .R and keep the script in the same folder as your data file.
  3. If you edited the sheet in aStat, also press Download edited data. The script then reads yourfile_edited.csv, so it reproduces exactly what you saw.
  4. Run the install.packages(...) line at the top once, then run the whole script.

Small last-digit differences can appear between R versions or package versions; the conclusions do not change.

Why the script matters

Reviewers, advisors, and your future self can see exactly what was done. A methods section can say: "Data were analyzed in R (version) using the script in the supplementary material." The FAQ has a citation for aStat.