Rverse Analytics
  • Services
    • Consulting
    • Services overview
    • Industries
    • Case studies
    • FAQ

    • Clinical & regulatory
    • For CROs & pharma
    • SAS to R migration
    • Clinical R toolkit
    • TLF gallery
  • Tools
    • All calculators
    • Which test should I use?

    • t-test
    • Chi-square test
    • One-way ANOVA
    • Sample size & power
    • p-value
    • Correlation
    • Linear regression
    • Odds ratio / RR / NNT
    • Cohen’s kappa
    • Z-score / normal

    • Markdown previewer
    • Live demos
    • gtsummary live demo
  • Learn
    • Online courses
    • Learn R
    • Learn Quarto
    • Learn Markdown
    • Biostatistics videos
    • Videos
    • R quiz

    • Biostatistics in R guide
    • Cheat sheets
    • Demo gallery
    • Glossary
  • Blog
    • All posts
    • R News
    • Resources
  • About
  • Contact
Categories
All (59)
anova (4)
assumptions (1)
biostatistics (10)
categorical-data (2)
cdisc (3)
clinical (19)
confidence-intervals (1)
consulting (2)
correlation (1)
data-quality (1)
datasets (1)
dataviz (1)
diagnostics (1)
distributions (1)
effect-size (1)
energy (1)
estimation (1)
forecasting (1)
getting-started (1)
ggplot2 (3)
gtsummary (2)
hypothesis-testing (5)
markdown (1)
p-values (1)
pdf (1)
power-analysis (1)
pROC (1)
psychometrics (1)
quarto (8)
R (1)
r-basics (1)
r-programming (5)
r-tutorial (18)
reference (1)
regression (2)
reporting (4)
reproducibility (2)
sample-size (1)
sas-to-r (8)
simulation (1)
statistics (23)
study-design (2)
survival (1)
survival-analysis (1)
teaching (1)
time-series (1)
validation (5)
websites (1)
workflow (6)

Blog

Notes on R, statistics and reproducible workflows.

How to Install R and RStudio (2026): Step-by-Step with Screenshots

r-basics
getting-started

Install R and RStudio on Windows, macOS or Linux in about ten minutes, then run your first lines of R: arithmetic, variables, vectors, a data frame, a histogram and your first package. Every step shown with real screenshots.

Oct 13, 2026
9 min

Building a Traceability Matrix for Statistical Programming (Without Maintaining It by Hand)

clinical
validation
r-programming

What a traceability matrix must link in a clinical programming project (SAP, specifications, programs, outputs, QC records), how to generate it from metadata in R instead of editing a spreadsheet, and how it supports a SAS-to-R equivalence report.

Oct 8, 2026
5 min

From SAS Macros to R Functions: A Worked Conversion

clinical
sas-to-r
r-programming

A SAS summary macro converted step by step into a tested R function inside a package: parameter mapping, by-group handling, missing values, formatted output and unit tests. The pattern that makes a SAS-to-R migration maintainable.

Oct 8, 2026
5 min

SAS to R Migration Roadmap: The Five Phases, What Each Delivers and What It Costs

clinical
sas-to-r

A phase-by-phase plan for moving clinical statistical programming from SAS to R: assessment, conversion, equivalence testing, documentation and sponsor/regulatory adoption. Deliverables, effort drivers and the mistakes that make migrations stall.

Oct 8, 2026
5 min

Missing Values in SAS vs R: The Differences That Change Your Numbers

sas-to-r
r-programming
clinical

SAS has numeric missing (.) and 27 special missings that sort low and compare as the smallest value; R has NA that propagates and NULL that is not a value. How each behaviour affects filters, sorts, counts and derivations in a SAS-to-R migration, with runnable examples.

Oct 8, 2026
6 min

Qualifying R Packages for Clinical Use with riskmetric and renv

clinical
validation
r-programming

A repeatable procedure for approving R packages in a regulated environment: acceptance criteria, riskmetric scoring, running package test suites as operational qualification, pinning with renv, and the decision record an auditor expects.

Oct 8, 2026
5 min

Dual Programming SAS vs R: Numerical Tolerance Rules That Survive QC

clinical
sas-to-r
validation

How to compare SAS and R outputs at dataset and TLF level during a migration: which tolerances to use for p-values, estimates and percentages, how to automate the comparison in R, and how to classify every difference as explained, accepted or deviation.

Oct 8, 2026
7 min

Why SAS and R Round Differently (and How to Make Them Agree)

clinical
sas-to-r
validation

SAS rounds half away from zero; R’s round() rounds half to even and works on binary floating point. Here is exactly where the differences appear in clinical tables, how to reproduce SAS rounding in R, and which rule to write into your tolerance document.

Oct 8, 2026
5 min

PROC FREQ, PROC MEANS and PROC UNIVARIATE in R: Side-by-Side Translations

sas-to-r
r-programming
clinical

The three SAS procedures behind most clinical summary tables, translated to base R and dplyr with matching output: frequencies and percentages with missing handling, by-group descriptive statistics, percentiles with SAS definitions, and the options that cause mismatches.

Oct 8, 2026
5 min

R vs SAS for Clinical Trials in 2026: An Honest Comparison for Decision-Makers

clinical
sas-to-r

Where R and SAS actually differ for clinical statistical programming today: regulatory acceptance, validation burden, the pharmaverse ecosystem, talent, cost, and the risks of migrating or of not migrating. Written for biostatistics heads and QA leads rather than programmers.

Oct 8, 2026
5 min

How to Write an R Validation Plan for Regulatory Submissions

clinical
validation
sas-to-r

A practical structure for validating R in a GxP clinical environment: scope and risk assessment, environment qualification with renv, package risk assessment with riskmetric, dual programming, traceability, deviation handling and the validation summary report. Templates described section by section.

Oct 8, 2026
5 min

ADaM Derivations in R with admiral: a Mini ADSL, End to End

clinical
cdisc
biostatistics

Derive an ADSL-style analysis dataset in R with the pharmaverse admiral package: treatment variables, analysis flags, age groups and time-to-event variables — every step traceable.

Aug 8, 2026
4 min

Is R Accepted by the FDA? The State of R-Based Submissions

clinical
cdisc

What the R Consortium Submissions Working Group pilots actually demonstrated, why ‘validated software’ is a property of your process rather than a licence, and what a defensible R stack looks like for CROs.

Aug 8, 2026
3 min

Clinical TLFs in R: gtsummary and rtables Side by Side

clinical
cdisc
biostatistics

Produce clinical trial tables in R two ways: a demography Table 1 with gtsummary and an adverse-event summary with rtables — the pharmaverse package built for shell-faithful CSR layouts.

Aug 8, 2026
3 min

Biostatistics datasets built into R (that you can explore in the browser)

r-tutorial
biostatistics
datasets
teaching

A guided tour of the clinical and biostatistics datasets that ship with R and its packages — infert, esoph, lung, pbc, birthwt, trial and the medicaldata collection — with what each is good for, and a browser playground to try them with no install.

Jul 10, 2026
4 min

gtsummary for beginners: build a Table 1 from clinical data, step by step

clinical
biostatistics
gtsummary
r-tutorial

A gentle, hands-on gtsummary tutorial in R. Starting from a clinical trial dataset, we build a publication-ready Table 1 one verb at a time — then you can run it yourself in the browser.

Jul 10, 2026
4 min

The Markdown cheat sheet (with a live editor)

markdown
reference

A compact Markdown syntax reference: headings, emphasis, lists, links, images, code, blockquotes and tables — with the rendered result beside each rule.

Jul 9, 2026
2 min

Your Table 1, in one line, with gtsummary

clinical
biostatistics
gtsummary
reporting

Baseline characteristics tables are the most-copied, most-error-prone table in clinical papers. gtsummary generates a publication-ready one — with the right summary and test per variable — from a single call.

Jul 9, 2026
2 min

The Quarto YAML header, explained field by field

quarto
workflow

A practical tour of the Quarto YAML header: title, author, date, format, toc, theme, code-fold, execute and params — what each field does and how to avoid indentation errors.

Jul 8, 2026
2 min

What to know before hiring an R consultant

consulting
reproducibility
workflow

The questions that separate a one-off script from work your team can actually own: scope, reproducibility, code ownership and handover.

Jul 8, 2026
3 min

One source, three deliverables: Quarto to Word, PDF and HTML

quarto
reporting

How to render a single Quarto document to HTML, PDF and Word from one source file — including what each format needs and when to reach for it.

Jul 7, 2026
2 min

Cohen’s d and effect size in R

statistics
effect-size
r-tutorial

Why a p-value isn’t enough, and how to compute and interpret Cohen’s d effect size in R — the standardized measure of how big a difference between two groups really is.

Jul 7, 2026
2 min

Sensitivity, specificity, PPV and NPV in R — and why prevalence changes everything

clinical
biostatistics
diagnostics

Diagnostic accuracy from a 2×2 table in base R: sensitivity, specificity, predictive values and likelihood ratios — plus the reason the same test looks brilliant in one clinic and useless in another.

Jul 6, 2026
3 min

Build a website with Quarto

quarto
websites

How to turn a folder of Quarto documents into a full website — project structure, the _quarto.yml config, navigation, and one-command publishing to the web.

Jul 6, 2026
3 min

Linear regression in R: how to read the output

statistics
regression
r-tutorial

Fit a linear regression in R with lm() and interpret every part of the summary — coefficients, p-values, R-squared and residuals — plus a tidy table with broom.

Jul 5, 2026
2 min

PDF from Quarto with Typst — no LaTeX required

quarto
pdf

How to produce PDFs from Quarto using the Typst engine instead of LaTeX: faster renders, simpler setup, and clean control over page layout.

Jul 5, 2026
2 min

R vs Python for statistical consulting: an honest take

consulting
R
workflow

Both are excellent. For inference-heavy, publication-bound statistical work, R still has an edge — and here is the specific, non-tribal reason why.

Jul 4, 2026
2 min

Quarto vs R Markdown (2026): key differences, what still works, and when to switch

quarto
workflow

Quarto vs R Markdown compared side by side: chunk options, cross-references, websites and books, multi-language support, whether your .Rmd files still render, and a simple rule for when switching is worth it.

Jul 4, 2026
3 min

Logistic regression in R: odds ratios and ROC/AUC, done right

clinical
biostatistics
regression
pROC

A binary clinical outcome needs two things: adjusted odds ratios that answer ‘what matters?’ and an ROC/AUC that answers ‘how well does the model discriminate?’. Here is the clean R workflow for both.

Jul 3, 2026
2 min

Quarto code chunk options, explained

quarto
reproducibility

A practical guide to Quarto chunk options: echo, eval, include, warning, message, output, and the figure options fig-cap, fig-width and label — with a live example.

Jul 3, 2026
2 min

Cross-references in Quarto: figures, tables and sections

quarto
reporting

How to number and cross-reference figures, tables, equations and sections in Quarto with @fig-, @tbl- and @sec- labels, so your report’s numbering is always correct.

Jul 2, 2026
2 min

Chi-square test of independence in R

statistics
categorical-data
r-tutorial

Test whether two categorical variables are associated using the chi-square test in R — building the contingency table, running chisq.test, and knowing when to switch to Fisher’s exact test.

Jul 2, 2026
2 min

Why Welch’s t-test should be your default

statistics
simulation

A short simulation showing what unequal variances do to the classic Student’s t-test — and why the Welch correction costs you almost nothing.

Jul 1, 2026
2 min

Cox proportional hazards in R — and the assumption you must check

clinical
biostatistics
survival

A hazard ratio is only meaningful if the proportional-hazards assumption holds. Fit a Cox model, report hazard ratios, then test the assumption with cox.zph() — the step too many analyses skip.

Jun 30, 2026
2 min

One-way ANOVA in R with post-hoc tests

statistics
anova
r-tutorial

Run a one-way ANOVA in R, then use Tukey’s HSD to find which groups actually differ — with the multiple-comparison correction that keeps your error rate honest.

Jun 28, 2026
1 min

ROC curve and AUC in R

clinical
biostatistics
r-tutorial

How to draw a ROC curve and compute the AUC in R with the pROC package — measuring how well a model or test discriminates between two outcomes, with a confidence interval.

Jun 27, 2026
2 min

Power analysis before data collection — in base R

statistics
study-design

You don’t need special software to plan a sample size. power.t.test() and a power curve answer the question in ten lines of R.

Jun 25, 2026
3 min

Checking normality in R: Shapiro–Wilk and Q–Q plots

statistics
assumptions
r-tutorial

How to check the normality assumption in R the right way — combining the Shapiro–Wilk test with a Q–Q plot, and why the plot usually matters more than the p-value.

Jun 24, 2026
2 min

Analysing energy consumption time series in R

energy
time-series
forecasting

Metering data is a time series with structure hiding in plain sight. In R you can decompose electricity load into trend, weekly seasonality and noise — and read a weekday load profile straight off the data.

Jun 22, 2026
3 min

t-test vs ANOVA: when to use which (with R)

statistics
hypothesis-testing
anova

A t-test compares two groups; ANOVA compares three or more. See in R why they’re the same test for two groups, and why you shouldn’t run many t-tests instead of one ANOVA.

Jun 20, 2026
2 min

Cronbach’s alpha in R (reliability analysis)

statistics
psychometrics
r-tutorial

How to compute and interpret Cronbach’s alpha in R with the psych package — measuring the internal consistency reliability of a questionnaire scale, and what the item statistics tell you.

Jun 19, 2026
2 min

One template, fifty reports: parameterised Quarto in practice

quarto
reporting
workflow

How we turn a single Quarto document into a batch of per-site or per-client reports with one line of R.

Jun 18, 2026
2 min

Repeated-measures ANOVA in R

statistics
anova
r-tutorial

How to run a repeated-measures ANOVA in R with aov() and an Error() term — the right way to compare three or more measurements on the same subjects — with a trajectory plot.

Jun 16, 2026
2 min

Pearson vs Spearman correlation: which one, and when (in R)

statistics
correlation
r-tutorial

Pearson measures linear association; Spearman measures monotonic association on ranks. A clear R example shows exactly when they disagree — and which to trust.

Jun 15, 2026
2 min

Chi-square goodness-of-fit test in R

statistics
categorical-data
r-tutorial

Use the chi-square goodness-of-fit test in R to check whether observed counts match an expected distribution — is a die fair, do categories match expected proportions — with chisq.test.

Jun 13, 2026
2 min

Confidence intervals explained, with an R simulation

statistics
confidence-intervals
estimation

What a 95% confidence interval really means — demonstrated by simulating repeated samples in R — plus how to compute intervals for a mean and a proportion.

Jun 12, 2026
2 min

How to interpret a p-value (correctly), with R

statistics
hypothesis-testing
p-values

What a p-value is, what it isn’t, and a simulation in R that shows why p-values are uniform under the null hypothesis — the intuition most explanations skip.

Jun 10, 2026
2 min

Write your ggplot2 theme once, use it everywhere

ggplot2
workflow

A ten-line theme function is the cheapest branding investment an analytics team can make. Here is ours, and how to set it as a session default.

Jun 8, 2026
3 min

Sample size calculation in R: t-tests, proportions and correlations

power-analysis
study-design
sample-size

How to compute the sample size you need in R with power.t.test and power.prop.test — the four quantities that trade off, worked examples, and a power curve you can adapt.

Jun 5, 2026
2 min

Two-way ANOVA in R

statistics
anova
r-tutorial

Run and interpret a two-way ANOVA in R with aov() — two factors plus their interaction — using the built-in ToothGrowth data, with an interaction plot.

Jun 3, 2026
2 min

One-sample t-test in R

statistics
hypothesis-testing
r-tutorial

How to run and interpret a one-sample t-test in R with t.test() — testing whether a sample mean differs from a known value, plus the assumptions to check.

May 31, 2026
2 min

Publication-quality Kaplan–Meier curves with survival + ggplot2

survival-analysis
ggplot2
biostatistics

The survfit object has everything you need; ggplot2 does the rest. A dependency-light recipe for survival curves you control completely.

May 28, 2026
2 min

Standard deviation vs standard error: the difference, in R

statistics
r-tutorial

Standard deviation describes the spread of data; standard error describes the precision of the mean. An R simulation shows why the standard error shrinks as your sample grows.

May 26, 2026
2 min

How to read a boxplot (and make one in R)

statistics
dataviz
r-tutorial

What the box, whiskers, line and dots in a boxplot actually mean — median, quartiles, IQR and outliers — with a labelled ggplot2 example in R.

May 24, 2026
2 min

Parametric vs non-parametric tests: how to choose (in R)

statistics
r-tutorial

When to use a t-test vs a Mann–Whitney, ANOVA vs Kruskal–Wallis, Pearson vs Spearman. A clear R example shows when non-parametric tests earn their keep.

May 21, 2026
2 min

One-tailed vs two-tailed tests: which to use (with R)

statistics
hypothesis-testing

When to use a one-tailed versus a two-tailed test, why the choice must be made before seeing the data, and how each changes the p-value — shown in R.

May 19, 2026
2 min

Type I vs Type II error, explained with an R simulation

statistics
hypothesis-testing

False positives (Type I) and false negatives (Type II) are the two ways a hypothesis test can be wrong. A short R simulation makes the trade-off — and the role of power — concrete.

May 16, 2026
2 min

Z-scores explained (with R): standardising, percentiles and probabilities

statistics
distributions
r-tutorial

What a z-score is, how it maps to a percentile, and how to compute z-scores and normal probabilities in R with pnorm and qnorm — the intuition and the code.

May 14, 2026
2 min

Same correlation, wildly different data: always plot first

statistics
ggplot2
data-quality

Anscombe’s quartet in tidy form — four datasets with identical summary statistics and completely different stories. A 50-year-old lesson that still gets ignored.

May 12, 2026
3 min
No matching items

    © 2026 Rverse Analytics — a boutique R studio.

    R consulting · statistics · Shiny · reproducible reporting
    We read R-bloggers · YouTube · Mastodon · Bluesky

    Built with Quarto & R.