StatsWithR StatDesk
Export data
Download the current data set.
Name the export
The extension is added automatically.
Choose an export format
Use StatDesk JSON, SPSS syntax, or Stata do-file export to preserve labels.
SPSS/Stata syntax exports rebuild the data and labels in those programs.
Calculate variables
Create variables from formulas.
Create a calculated variable
Use R-like formulas such as ifelse(petal_width > mean(petal_width), 1, 0). Bare names work; use brackets for names with spaces.
Formula function reference
Variable references
Use bare names such as age; use brackets for names with spaces.
Examples: age, pre_score - post_score, [pre score] - [post score].
Operators
+, -, *, /, ^, %%, %/%, and parentheses. JavaScript-style ** still works, but ^ is recommended for R-like exponent syntax.
Comparisons: ==, !=, >, >=, <, <=. Logical operators: R-style &, |, ! and JavaScript-style &&, ||.
Math functions
abs, sqrt, log, log10, exp, round, floor, ceiling/ceil, pow, sin, cos, tan.
Examples: sqrt(variance), round(score, 2), x^2, ceiling(score).
Row summaries
min, max, pmin, pmax, sum, mean, median, sd, and var work across values supplied in the same row.
Examples: mean(petal_width) for a column mean, mean(item1, item2, item3) for a row-wise mean, and ifelse(petal_width > mean(petal_width), 1, 0).
Conditional logic
ifelse(condition, value_if_true, value_if_false).
Examples: ifelse(age >= 18, 1, 0), ifelse(group == "Treatment", 1, 0), ifelse(score > mean(item1, item2), "High", "Low").
Missing values and text
missing/is.na, notmissing, as.numeric/asNumber, nchar/len, tolower/lower, toupper/upper, grepl, contains, paste, and paste0.
Examples: ifelse(is.na(score), 0, score), tolower(group), grepl("yes", notes), paste0(group, "_", score).
Variable labels
Edit variable labels.
Edit labels
Use StatDesk JSON, SPSS syntax, or Stata do-file export to preserve labels.
Missing value recoding
Convert selected values to empty cells.
Recode indicators to empty cells
Enter values to convert to empty cells.
Plots
CanvasExport the current plot as a PNG.
Save and restore your work
Save or restore your session.
Autosave status: not saved yet
Includes data, output, labels, settings, and plot state.
What gets saved
- Browser autosave: restores the most recent session after a refresh or browser restart when browser storage is available. Autosave uses the same compact state format to reduce browser storage use.
- Application state file: downloads a compact portable JSON file containing the current data, labels, variable type settings, output, selected analysis, paging, tabs, plot settings, and StatDesk version information.
- Local-only storage: browser autosave is stored locally with IndexedDB. This feature does not send your data to a server.
- Long-term backup: use Save application state file when you want a file you can keep, move to another computer, or reload later.
- Privacy reminder: only load saved state files that you created or trust, because session files can contain output text and project data.
- Browser limits: private browsing, clearing site data, storage quotas, or mobile browser cleanup can remove the browser autosave copy.
Accuracy tests
About StatsWithR StatDesk
StatsWithR StatDesk is a free browser-based statistical analysis application created by Michael Harris, MS, MAS for students, instructors, researchers, and applied analysts.
The application is designed for transparent data analysis workflows: users can import or enter data, label variables, run common statistical procedures, view exportable output, create plots, and compare methods with analogous R code examples.
What StatDesk is for
- Teaching introductory and applied statistics with visible analysis steps.
- Exploring small to moderate research datasets directly in a browser.
- Creating exportable statistical output and plots for review or documentation.
- Learning how statistical procedures map to comparable R code.
- Performing preliminary checks before confirming important results in trusted statistical software.
Supported analysis areas
StatDesk includes tools for data editing, variable labels, missing value recoding, descriptive statistics, frequencies, grouped summaries, correlations, t tests, ANOVA, chi-square tests, regression, generalized linear models, mediation, relative weights, commonality analysis, VIF, diagnostic accuracy, ROC/AUC, survival summaries, longitudinal summaries, multilevel summaries, reliability, PCA, process capability, DPMO/yield calculations, control charts, Pareto charts, FMEA priority scoring, measurement-system analysis, DOE/factor screening, Taguchi loss calculations, and plotting.
The goal is to cover common applied statistics workflows in one accessible browser interface, with emphasis on transparent output, readable setup screens, and code examples that help users understand how the analysis could be reproduced in R.
How the local workflow works
StatDesk is built as a client-side web application. When users import a CSV, TSV, or spreadsheet file, the data are handled in the browser session so the app can support fast exploration without requiring a server-side data upload. Users can edit data, add calculated variables, apply variable labels, recode missing values, save a local workspace file, and export results for documentation.
This local-first design is useful for teaching, demonstrations, preliminary research checks, and situations where users want to explore a dataset before moving to a larger statistical environment.
Validation and reproducibility
The Accuracy tests section is included to make quality control visible. It runs benchmark checks across the app's statistical methods and displays side-by-side comparisons so users can see whether calculations agree with expected numeric results.
Many analysis setup screens also include analogous R code. These examples are intended to support reproducible learning, make the statistical workflow easier to audit, and help users transfer an exploratory analysis from StatDesk into a script-based workflow when needed.
Academic and instructional use
StatDesk can be used as a teaching aid for statistics courses, research methods courses, workshops, and self-guided learning. It is especially useful when the goal is to connect statistical concepts, point-and-click analysis setup, exportable tables, visualizations, and R programming examples in the same environment.
Researchers and students may also use it for early-stage data screening, exploratory analyses, model setup practice, assumption checks, and creation of preliminary output before confirming final results in validated statistical software.
Limitations and verification
StatDesk is beta software. Results are intended for education, exploration, and research workflow support. Important findings should be verified against trusted statistical software and reviewed by a qualified analyst before being used for publication, clinical, legal, financial, or policy decisions.
The app is not intended to replace a statistician, institutional data security review, clinical trial software, regulatory analysis platform, or full programming environment. Users remain responsible for checking data quality, model assumptions, study design, interpretation, and reporting decisions.
Version and citation
Created by Michael Harris, MS, MAS for StatsWithR.com.
Recommended citation
Harris, M. (2026). StatsWithR StatDesk (Version 0.9.1) [Computer software]. StatsWithR.com. https://www.statswithr.com/statdesk
BibTeX / software citation
@software{harris2026statdesk,
author = {Harris, Michael},
title = {StatsWithR StatDesk},
version = {0.9.1},
year = {2026},
url = {https://www.statswithr.com/statdesk},
note = {Statistical analysis software by Michael Harris, MS, MAS.}
}
Quick start
- Load the iris sample, import a file, or enter data in the grid.
- Check variable types in the left panel and change any that are incorrect.
- Choose an analysis, select variables, and run it.
- Compare important results with R or another trusted source.
Data and variables
- Edit cells directly in Data View.
- Use Undo and Redo for recent data edits.
- Use Variable labels for readable labels in exports.
- Use Missing values to convert selected codes to empty cells.
Calculated variables
- Use R-like formulas:
ifelse(petal_width > mean(petal_width), 1, 0). - Bare names work for simple variables; use brackets for names with spaces.
mean(variable),sd(variable), and similar summaries use the full column.mean(item1, item2, item3)summarizes row values.- The formula stays in the editor after the variable is created.
Formula reference
- Operators:
+,-,*,/,^,%%,%/%,&,|,!. - Math:
abs,sqrt,log,round,floor,ceiling,min,max,sum,mean,median,sd,var. - Logic/text:
ifelse,is.na,as.numeric,nchar,tolower,toupper,grepl,paste,paste0.
Analyses and output
- Analysis Setup shows the required fields for the selected method.
- The R code panel shows comparable R syntax for review.
- Use Output to review results and export a PDF.
- Use Plots to create and export common exploratory graphics.
Save, restore, and export
- Autosave stores the current session in this browser.
- Export a session file to move work between browsers or devices.
- Use StatDesk JSON to preserve data, labels, and variable types.
- Use CSV/TSV for broad compatibility.
- Use SPSS or Stata syntax exports when labels need to carry into those programs.
Accuracy tests
- Accuracy tests are development checks for the browser calculations.
- Passing tests do not make the app fully validated.
- Methods still need review by multiple qualified experts.
Supported file formats
- Import: CSV, TSV/TXT, JSON, StatDesk JSON, XLSX, Excel XML/HTML tables, SPSS SAV, Stata DTA, SPSS syntax, and Stata do-files.
- Export: CSV, TSV, JSON, StatDesk JSON, HTML table, Excel XML, SPSS syntax, and Stata do-file.
- Native SPSS/Stata imports are best-effort. Use syntax exports for label-preserving handoff.
Legal and use disclaimer
- StatDesk is beta software. Results are experimental and may contain errors.
- Do not rely on StatDesk as the sole source for clinical, regulatory, legal, financial, publication-critical, or high-stakes decisions.
- Users are responsible for verifying results with trusted statistical software, source data review, and qualified expert judgment.
- Accuracy of all methods should be reviewed by multiple qualified experts before the software is treated as validated.
- The software is provided without warranty; use is at the user's own risk.