r/rstats • • 5h ago

qol 1.3.6: More flexibility, better if and happy birthday

3 Upvotes

The qol package can be your every day helper, if you need efficient high level functions in terms of data wrangling and tabulation. Generate variables, aggregate, transpose, join, save/load, import/export, frequencies, crosstabes or basically just any Excel table you like to create fully styled. It is all in there in just one package.

To get a full overview of the package have a look at the GitHub page: https://github.com/s3rdia/qol

I am probably repeating myself, but the updates keep getting bigger instead of smaller. The good thing is though that what is implemented and what is fixed is becoming more and more specific. But what I completely forgot until now is: On October 10th was qol’s first birthday. Yeah! I somehow can’t believe how fast a year can pass. In any case I am very happy with how things shaped out and a bit shocked in how big this got. And it will become even bigger. Let’s get going. The full release notes can be found here.

Happy birthday to qol

First things first, let us get some numbers out there. Since the first release on CRAN on October 10th 2025 we got:

  • 13 updates released
  • 103 new functions added and 4 removed
  • 136 new functionalities added to existing functions
  • 160 bugs fixed
  • The first release had 37 exported functions the current release has 136
  • The original source code had less than 10.000 lines of code, the current version has more than 25.000
  • At the beginning there were 427 unit test expectations now there are 1.493
  • The package was downloaded 5.400 times since the first release

More parameters support macro variables

Within any_table the parameters values, by, box, pct_group, pct_value and pct_block now support macro variables, summarise_plus parameter class now got this functionality and all functions which can handle formats can say: the formats now also supports the SAS macro variable writing style.

More flexibility when joining

multi_join can now join multiple data frames on different variables within itself. Before one could only set a static set of variables for the base data frame, but now one can set different variables per join for the base data frame. Additionally variables which are just joined onto the base data frame can then be used as key variables for upcoming joins.

df1d <- data.frame(key1 = c(1, 1, 2),
                   key2 = c("a", "a", "b"),
                   key3 = c(10, 20, 20),
                   a    = "a")

df2d <- data.frame(var1 = c(1, 2),
                   var2 = c("a", "b"),
                   b    = "b")

df3d <- data.frame(any  = c("a", "a", "b"),
                   name = c(10, 20, 20),
                   c    = "c")

multiple_joined4 <- multi_join(list(df1d, df2d, df3d),
                               on = list(df1d = list(c("key1", "key2"),
                                                     c("key3", "key2")),
                                         df2d = c("var1", "var2"),
                                         df3d = c("name", "any")))

Labels usable in tables

frequencies, crosstabs and any_table are now able to handle value labels attached to variables. Which means in your data you may see values 1 and 2, but in the final table you see “Male” and “Female” if these labels are attached. Formats will always overrule labels, if a format is applied to a labelled variable.

Variable ranges by pattern

keep, dropp, retain_variables and add_variable_range are now able to select variable ranges by pattern. When writing e.g. age1-age10 (the hyphen triggers this behaviour) all “age” variables from 1 to 10 are selected regardless of where they are located in the data set.
keep and dropp now also accept variable vectors and can keep/drop columns with NA as name.

A real else if

if., else_if. and else. now add an attribute to the data frame which carries the currently active condition as a logical vector so that follow up statements can catch this and further work with an already handled condition. This enables else_if. and else. to not only work on NA values.
The do_if family now also uses the way of attaching attributes to the data frame instead of adding real variables.

Something is coming up


r/rstats • • 23h ago

Advice on writing better functions in R?

Post image
62 Upvotes

I've recently started trying to learn more about how to actually write good R code and have been trying to use the language in a more functional paradigm. I'm a grad student doing genetics research and definitely not an experienced programmer so hopefully I'm not making any egregious mistakes.

This is a snippet of functions in a script I'm currently working on and namely the last function I define here I think isn't great.

The second image is a rewritten version where I'm not assigning local variables within the function since that seems wrong to me. But I feel like it gets somewhat confusing looking. Should I be using a magritrrr pipe in this situation? Or is it better to stick with the native pipe operator?

Thank you for any feedback or advice!


r/rstats • • 15h ago

bones: Content-shaped loading placeholders for Shiny outputs

9 Upvotes

I wrote a small package called bones that shows a grey placeholder in the shape of the content while a Shiny output loads. It reserves space for the output to help keep the page steady.

Wrap an output like this:

withBones(plotOutput("chart"))
  • The shape comes from the output: bars for plots, rows for tables, lines for text. Plots default to bars; you can set another chart shape.
  • Loads under 300 ms show no placeholder, so fast loads do not flicker.
  • When an output updates, the old content stays on screen, dimmed.

bones_auto() wraps all outputs in a UI at once.

Version 0.1.1 is on CRAN:

install.packages("bones")

Live demo runs in your browser with nothing to install. Docs.

I’d welcome feedback, especially examples of outputs that get the wrong shape.


r/rstats • • 3h ago

The R Consortium’s R + AI Community Needs Survey closes on October 28!

1 Upvotes

If you use R, with or without AI, we’d love 7–10 minutes of your time on tools, trust, reproducibility, and real-world workflows. Your answers help shape R Consortium webinars, working groups, educational resources, and R+AI 2026 programming.

As a thank-you, respondents who share an email get early access to the results before they’re presented publicly at R+AI 2026 (Nov 10-11, 2026).

Take the survey by Oct 28: https://rconsortium.github.io/RplusAI_website/survey.html


r/rstats • • 2d ago

Installing Rtools on a Work Laptop Without Administrator Access: Do I Need IT Approval?

11 Upvotes

I use R extensively for engineering applications and currently have the free desktop version of RStudio installed on my work laptop.

I'm developing an R Shiny application for mechanical design optimization. The application evaluates numerous combinations of design variables, geometric constraints, and operating parameters to identify the optimal design.

The problem is computational performance. The optimization involves thousands of iterations and geometric calculations, which can take a significant amount of time when executed entirely in R.

I'm exploring ways to accelerate these calculations using C++ through Rcpp, while keeping R Shiny as the main application framework.

From what I understand:

  • Rcpp can be installed using install.packages("Rcpp").
  • Rtools provides the C/C++ compiler toolchain required to compile C++ code for use with R on Windows.
  • Unlike regular R packages, Rtools is a separate installation and may require administrator privileges or IT approval on a corporate laptop.

My questions are:

  1. Does Rtools require administrator privileges? Can I install it within my user directory without admin access?
  2. Can Rtools be installed through the RStudio terminal, PowerShell, or Command Prompt, rather than using the Windows installer?
  3. If administrator privileges are required, what's the best way to request Rtools installation from my company's IT department?
  4. Are there any alternatives to Rtools for compiling and running C++ code with Rcpp on Windows?
  5. Is there a way to use precompiled C++ libraries or another high-performance approach without installing a compiler locally?

Ideally, I'd like to keep the existing R Shiny application and move only the computationally intensive optimization routines into C++.

Has anyone dealt with this in a corporate Windows environment? I'd appreciate recommendations on the simplest IT-compliant approach, especially if it can be done without administrator access.


r/rstats • • 3d ago

R+AI 2026 Workshop - Where Does AI Fit in R Package Risk-Based Assessment?

7 Upvotes

The R Validation Hub’s risk-based framework is how many regulated teams trust R packages. AI is starting to look useful in that workflow (reviewing maintenance signals at scale, drafting remediation tests, flagging version changes) and it also raises a harder question:

How should risk assessment treat packages or contributions that are themselves AI-generated or AI-assisted?

At R+AI 2026, Ileana Saenz (R Validation Hub / Appsilon) and Doug Kelkhoff (Chair, R Validation Hub / Domino) lead a live working session to dig into where AI can realistically help, where AI-assisted evaluation introduces new risks that need validation of their own, and what a minimal, practical pilot could look like. Session notes feed a community whitepaper.

Where Does AI Fit in R Package Risk-Based Assessment?: A Working Session Toward a Community Whitepaper

November 10 · 3:40 PM Eastern · Online workshop

If you work in R package validation, regulated environments, or applied AI tooling, this one’s built for you.

R+AI 2026 is the R Consortium’s conference on R and AI: November 10–11, fully online, with live Q&A and recordings.

See the full workshop info:

https://rconsortium.github.io/RplusAI_website/workshops.html#where-does-ai-fit


r/rstats • • 4d ago

Seasonal job will pay for a certificate course, would the Harvard edX Data Analysis for Life Sciences course actually add value to my resume?

1 Upvotes

I am in the final 6 weeks of my seasonal botany technician job, and the conservation corps I work for allotted me ~$900 in professional development funds that I have yet to use. I took a Biostatistics course (all in Rstudio) at my university and continued to use the basic R skills I learned as I did undergrad research and after graduation when I moved into my seasonal job.

I want to use the professional development funds, but only if it will actually be valuable to me as I apply for other jobs in the botany/wildlife biology field. If anyone has experience as a hiring manager or similar role, would a certificate (such as Harvard edX Data Analysis for Life Sciences) add substantial value to my resume? Or is it just as valuable to work through free online resources (such as R for Data Science) and build a GitHub repository to display my skills to potential employers?


r/rstats • • 5d ago

termr is now on CRAN - a terminal UI framework for R

87 Upvotes

A little update on a project I shared here recently: termr is now available on CRAN!

It's a framework for building interactive terminal applications in R. Think data browsers, dashboards, SQL tools, or just nicer interfaces around existing R workflows.

It has keyboard navigation, widgets, layouts, reactive state, themes, and a headless testing API. There's also experimental support for SQLite/DBI workflows, which a few people here mentioned they'd find useful.

You can now install it directly:

install.packages("termr")

GitHub: https://github.com/menshikovs/termr

CRAN: https://CRAN.R-project.org/package=termr


r/rstats • • 5d ago

glyph 0.2.0 is now on CRAN

23 Upvotes

If you need a package that you can use for plotting interactive graphs, try glyph V0.2.0, it's still in development. (Some new features have been added and bugs fixed)


r/rstats • • 4d ago

Who is the best stats video tutor? [Q]

Thumbnail
0 Upvotes

r/rstats • • 5d ago

[Phylogenetic analysis] Assumptions in PGLS

1 Upvotes

I am testing the correlation between the values of a variable at the tips of a phylogenetic tree (let's say the beak length) and the pathwise rate of the trait itself (i.e. a measure of the total changes in rate a species has experienced during the course of its evolution). To remove the effect of body size, I am working on the residual of the variable (i.e. the variable corrected for SVL). To test for the correlation, I performed a pgls with the pgls() function in lmtest (I am working in RStudio). I am encountering some issues with heteroskedasticity (see attached images; bptest significant).

I am also having problems with the normality of the residuals (see attached images; Shapiro test significant). On the other hand, I was reading from https://blog.phytools.org/2013/02/a-comment-on-distribution-of-residuals.html that, by accounting for residuals controlling for phylogeny you should solve this problem [Revell suggests something like lillie.test(chol(solve(vcv(tree)))%*%residuals(corr))]. Can anyone confirm? Am I misunderstanding?

Can anyone help with it?

Thanks a lot!


r/rstats • • 6d ago

Feeling stuck trying to transition from Data Analyst to Statistical Programmer

Thumbnail
4 Upvotes

r/rstats • • 8d ago

What should I do after completing CS50R?

2 Upvotes

Hi everyone!

I'm a student from Pakistan, and I've been learning R through Harvard's CS50R course. I've worked through the problem sets, and now I'm wondering what I should do next to turn my learning into practical experience.

My goal is to work on small, real-world projects involving data analysis and visualization, and eventually earn some money using R.

I'd appreciate advice on a few things:

  1. What should I learn or revise after CS50R?
  2. Should I build more portfolio projects before looking for clients or internships?
  3. Where can beginners find small R programming or data analysis projects?
  4. Is it realistic to get paid work with CS50R knowledge, or should I learn additional tools first?
  5. If you started with R as a beginner, what would you do differently?

I'm not expecting to become an expert overnight. I just want a practical roadmap to move from learning R to actually using it on real projects.

Thanks for any advice!


r/rstats • • 10d ago

dragonfarm 0.4.0: ask your PDFs anything, then fine-tune a model on them, all from R

20 Upvotes

Fine-tuning needs hundreds of training examples, and most of us only have documents. dragonfarm turns one into the other on your own laptop, with RAG built in so answers stay grounded in your documents. Feedback welcome, especially documents that break it.

Write-up with measurements: https://dragonfarm.dev/articles/introducing-0-4-0.html

GitHub: https://github.com/tejas4patel/dragonfarm

Feedback welcome, especially documents that break it.


r/rstats • • 10d ago

Full R+AI 2026 schedule available now!

16 Upvotes

The full R+AI 2026 schedule is up, and it is a good one!

November 10–11. 100% online.

Two days of keynotes, talks, lightning talks, a workshop, and a tutorial on how the R community is putting AI to work.

A taste of the program:

  • Why statistical thinking still matters when generative AI writes the code
  • Agents in R, from rebuilding Claude Code in 50 lines to auditable human–AI workflows
  • Private AI for sensitive data, and governance for agentic systems in production
  • A workshop on where AI fits in risk-based R package assessment
  • A tutorial on shipping R drug-discovery models from the lab onto an enterprise platform

See the full schedule and register now! https://rconsortium.github.io/RplusAI_website/program.html


r/rstats • • 12d ago

How can an R user contribute to R itself?

84 Upvotes

You don’t have to be a C programmer to contribute to R.

R has been maintained for more than 30 years. Its future depends on more people being able to take part in that work.

In the R Consortium webinar Sustaining R, R Core members Simon Urbanek, Kurt Hornik, and Heather Turner answered a question that comes up often: how can an R user contribute to R itself?

The answer is broader than writing language internals. You can:

  • Report a bug or propose a feature on Bugzilla or R-devel
  • Improve documentation, translations, testing, or contributor infrastructure
  • Join an R Dev Day or R Contributor Office Hour
  • Build R from source and submit a patch

The new post covers how to get started, why R still uses Subversion and Bugzilla, and how R Core is thinking about AI-assisted contributions: useful as a tool, as long as a person understands the work and takes responsibility for it.

Read the guide: https://r-consortium.org/posts/how-do-i-contribute-to-r/


r/rstats • • 11d ago

Ieipio for RStats

1 Upvotes

Released ieiprio, an R package to prioritize variants in inborn errors of immunity from VCF, Sanger traces or plain text. It ships 12 real ClinVar variants to practice on, offline. Guides and code below, feedback welcome.
https://gentlenmoron.github.io/ieiprio/


r/rstats • • 12d ago

How to add a statistical model equation on a sicentific paper?

Thumbnail
1 Upvotes

r/rstats • • 13d ago

More assignment operators in R

8 Upvotes

It's so odd for R to have no arithmetic assignment operators like +=, which this feature is so convenient to write. Python has them, Julia has them - the list still keeps coming up. I know you can write your own infix operator in R, enclosing them with %%:

`%+=%` <- function(e1, e2) {
  eval(substitute(e1 <- e1 + e2), envir = parent.frame())
}
a <- 2
a %+=% 7
a  # 9

But would be nice if R has them.


r/rstats • • 13d ago

[Software] SimtablR: Quick and Easy Epidemiological Tables, Diagnostic Tests, and Multi-Outcome Regression - version 3 now available on CRAN!

Thumbnail
2 Upvotes

r/rstats • • 14d ago

nlmixr2save 0.2.0, now on CRAN: fits you can read, runs you don't repeat

3 Upvotes

A pharmacometric fit can take minutes to weeks. nlmixr2save keeps that fit readable, and skips the rerun when nothing has changed.

A fit is the saved result of estimating a drug model against observed data, such as measured concentrations.

The nlmixr2 Working Group’s latest post introduces nlmixr2save 0.2.0, now on CRAN. saveFit() stores a fit as text: models as R source, tables as CSV, bundled in one zip. loadFit() brings back a working fit for plots, visual predictive checks, and the next model. Switch <- to := and a script or report loads from cache until the model, the data, or the estimation options change.

Matthew Fidler covers the same material on the nlmixr2save poster at ACoP 2026 (October 11–14, National Harbor).

A 7-minute walkthrough is linked from the post.

https://r-consortium.org/posts/nlmixr2save/


r/rstats • • 15d ago

Anyone Else Feel That RStudio IDE Is Far Superior to Positron?

156 Upvotes

In my experience, Positron feels extremely laggy, slow, and riddled with bugs. Meanwhile, RStudio has been blazing fast, stable, and virtually trouble-free. I've rarely encountered issues with environment dependencies, package installations, or general usability.

It literally takes about five minutes to install R and RStudio and get straight to work. Everything just works, without having to spend time troubleshooting the IDE itself.

I really hope Posit continues actively developing and supporting RStudio rather than eventually forcing everyone to migrate to Positron

To me, RStudio is a much more polished, reliable, and efficient IDE for working with R. I genuinely don't see the appeal of moving to Positron when RStudio already does its job so well.

Rstudio should also support seamless Python integration, hate to use Positron just for Python


r/rstats • • 14d ago

Should I include samples for all comparisons in one DESeq2 script or should I run individual DESeq2 runs for each comparison?

Thumbnail
1 Upvotes

r/rstats • • 15d ago

[Package] ParBayesianOptimization is back on CRAN

17 Upvotes

Hi,

Some people may remember that the author of this package posted last year about changing package ownership because he didn’t had time to resolve issues that eventually caused the package to be removed from CRAN.

I suggested a PR but since he didn’t respond in a while I decided to resubmit the package back to CRAN from my fork and maintain it at least for the time being.

I thought it’s a good idea to post here as the package seems quite popular.

If any users find issues or want to contribute the code is now maintained on my GitHub: https://github.com/novica/ParBayesianOptimization


r/rstats • • 15d ago

Liquid Glass themes for Shiny. 0.5.0 is on CRAN.

Post image
4 Upvotes

What's new:

  • Closer to iOS 27 Liquid Glass: a refraction lens at the glass edges (Chromium), tab indicators that slide between items, buttons that spring when pressed, and tab bars that shrink as you scroll
  • Mobile ready: 44px tap targets, phone sidebars open as a full overlay, and no sideways scroll at iPhone widths
  • Every live demo has a phone preview button on desktop
  • shinychat apps pick up the glass look, shown off in a new chat demo (Harbor notes) that can reply live with Gemini
  • shinyreact support, with React glass components that share the same theme
  • The ?shinyglass help page now walks through the whole setup

Heads up that some visual defaults changed on purpose. The migrating vignette shows how to get the 0.4.0 look back.

install.packages("shinyglass")

Live demos (may take a few seconds to wake):

Docs: https://ericrayanderson.github.io/shinyglass/

CRAN: https://cran.r-project.org/package=shinyglass