r/rstats • u/Bigtits321 • 59m ago
I need help.
That’s it. I am trying to run a power analysis and I want my computer dismantled. I can’t calculate my degrees of freedom. I have all the context. Please help.
r/rstats • u/Bigtits321 • 59m ago
That’s it. I am trying to run a power analysis and I want my computer dismantled. I can’t calculate my degrees of freedom. I have all the context. Please help.
r/rstats • u/Large_Sheepherder157 • 1d ago

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.
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:
See the full schedule and register now! https://rconsortium.github.io/RplusAI_website/program.html
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:
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 • u/gentlenmoron • 2d ago
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 • u/Dangerous_Spite8272 • 3d ago
r/rstats • u/Confident_Bee8187 • 4d ago
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 • u/MatheusTG14 • 4d ago
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.
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 • u/Nautilus0_400 • 5d ago
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 • u/ericrayanderson • 6d ago
What's new:
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):
r/rstats • u/Normal-Safety8324 • 7d ago
I maintain tidycreel, which has just been accepted on CRAN as version 8.0.0.
Creel surveys use angler counts and interviews to estimate fishing effort, catch, and harvest. The analysis depends on how days, sites, and anglers were sampled. tidycreel provides a tidy, pipe-friendly interface for keeping that survey structure attached to the data, with the survey package supplying the design-based foundation.
The core workflow is to define a survey calendar and strata, attach count and interview data, check coverage and data quality, and estimate effort, rates, and totals with uncertainty. The distinction between completed access-point trips and incomplete roving interviews matters when choosing a rate estimator.
Install the CRAN release:
install.packages("tidycreel")
The source package is available now. Windows and macOS binaries are pending; I expect them within the next couple of days. Until then, use install.packages("tidycreel", type = "source") if a binary is unavailable. tidycreel itself has no compiled code, although source-built dependencies may need build tools.
For development changes ahead of CRAN:
install.packages("pak") # If needed
pak::pak("chrischizinski/tidycreel")
In 8.0.0, aerial catch, harvest, and release totals are underestimated; use the GitHub development version for those totals until 8.0.1 reaches CRAN (release notes). Non-aerial designs are unaffected.
There are 24 package vignettes, a practical blog series, and the companion book Modern Creel Survey Analysis in R. The book remains a work in progress and develops the sampling and statistical reasoning behind the workflows.
I also wrote a short release post with installation instructions and links to these resources.
I would welcome feedback from people working with creel or other field survey data, especially on data structures and diagnostics. What sampling or data coverage problems are hardest to make visible in your current workflow?
r/rstats • u/gyp_casino • 7d ago
I am more of a stats guy, so I don't do this every day, but I needed to describe some nonlinear relationships by category in a lightweight way.
It seems Shap contributions are a valid and popular approach. Not the Shap values (a vector), but the contributions by variable (a matrix or data frame).
Here's my experience trying to do this in R.
I first tried {ranger}. ranger makes is easy to fit, predict, and get importances, but does not have any support for Shap contributions.
I tried to use {fastshap} in combination with ranger. fastshap is removed from CRAN! This is the package author's comment on the package GitHub. "fastshap is no longer available on CRAN due to CRAN’s stringent and ever-changing policies. It is now hosted on r-universe, which provides a reliable alternative for distributing R packages."
I tried to use {treeshap} instead. treeshap is on CRAN. treeshap needs to unify tree regression objects first from various packages (ranger, xgboost, etc.). treeshap::ranger.unify() crashed R 66% of the time! When it does succeed, treeshap::importance() crashed R 100% of the time!
I found that {xgboost} has support for Shap contributions within its own package. Good. I fit a model successfully. I calculate the Shap contributions by predict(model, newdata = x, predcontrib = TRUE) . This only returns the Shap values (vector; not matrix). Why? Is predcontrib not doing anything? I debug for a long time. I find that my fit model is an xgboost object, and there is another possible model object produced by the package of class xgb.Booster. The method I thought I was using was predict.xgb.Booster, but predict was actually dispatching to predict.xgboost, which does not have a predcontrib argument. I have to hack the generics by calling xgboost:::predict.xgb.Booster(). Finally, I feel like it worked.
r/rstats • u/Titolise • 7d ago
Hi everyone!
As part of my Master's thesis in Statistics, I developed hdsbm, an R package for estimating and simulating discrete-time Dynamic Stochastic Block Models (DSBM).
Temporal block models often suffer from combinatorial explosion and multi-modal likelihood landscapes, making standard local search heuristics prone to getting trapped in sub-optimal local extrema.
hdsbm addresses this by extending a hybrid Classification EM (CEM) approach to the dynamic setting:
* Perturbed SVD Multi-Start: Couples deterministic spectral embeddings of the time-averaged network with controlled stochastic perturbations to thoroughly explore the likelihood surface.
* C++ Backend: Uses RcppArmadillo to accelerate dyadic reallocation passes and combinatorial greedy sweeps.
* Dual Decoding: Provides both pointwise greedy labels and global Viterbi trajectory decoding.
* Model Selection: Includes an Integrated Completed Likelihood (ICL) criterion tailored for dynamic graphs.
```r library(hdsbm) data(toy_hdsbm)
fit <- hdsbm_fit(toy_hdsbm$Y, k = 3, nrep = 5, seed = 123) print(fit)
icl(fit) ```
Documentation & pkgdown: https://titolise.github.io/Hybrid-DSBMs/
I would love to hear your feedback on API ergonomics, potential edge cases, or ideas for interesting benchmark scenarios!
r/rstats • u/spurious_elephant • 7d ago
Just a very quick vibe-coded ggplot theme. I saw this excellent Economist article (gift link) and was inspired.
r/rstats • u/Firm-Neck7934 • 8d ago
hey all,
curious to get some recommendations of some dAta sets native to R, R studio. This is for a graduate visualization class (I know, it seems silly and trivial, but C'est la vie). pretty open ended project, and want to know some options instead of asking Claude
r/rstats • u/alexis_placet • 8d ago
You can now publish static dashboard on emscripten-forge and github
You can check an example here: https://emscripten-forge.github.io/r-shiny-template/
r/rstats • u/VirtualCicada7000 • 9d ago
Hi everyone,
I've been working on an R package called termr.
It includes:
- widgets, layouts, events and reactive state
- virtualized data tables with sorting, filtering and search
- lazy table sources and DBI/SQLite workflows
- background R workers with progress and cancellation
- dialogs, tabs, trees, text editing, command palette
- headless testing with testthat
- Windows, Linux, macOS and interactive SSH support
The screenshot is a real order explorer running on 20,000 rows of synthetic data.
A tiny app looks like this:
library(termr)
app(
vertical(
label("Hello from R"),
data_table(mtcars),
button("Quit", on_press = function(event, app) app$exit())
)
) |> run()
The project is MIT licensed and currently at v1.0.0-rc1.
I'd really like feedback from R users.
Also, you can use AI if you want to try coding with this library.
GitHub:
Join us for R+AI 2026, November 10–11, the R Consortium's virtual conference exploring the intersection of open-source R and artificial intelligence.
Register by October 12 to save:
- 50% off for students
- Over 30% off for academia and industry
Connect with practitioners, researchers, and industry experts exploring machine learning, large language models in R, AI-assisted coding, real-world applications, and responsible AI.
Two days of talks, workshops, lightning talks, and panels focused on the future of R and AI.
Don't miss the Early Bird deadline!
Register now: https://rconsortium.github.io/RplusAI_website/
r/rstats • u/alexis_placet • 9d ago
It's now possible to use both R and Python in the same notebook, thanks r-reticulate, in the browser:
The article is here: https://emscripten-forge.org/blog/posts/reticulate.html
And the example: https://notebook.link/@DerThorsten/r-reticulate
r/rstats • u/Ahmedstat • 9d ago
TL;DR:
Standard spatial models (Kriging, Spatial Random Forests, GAMs) rely on strict Gaussianity or spatial stationarity to estimate uncertainty. Under spatial heteroskedasticity or heavy-tailed noise, empirical coverage systematically falls below nominal 95%. We built spconform, an R package implementing Spatial Conformal Prediction to deliver model-agnostic, distribution-free 1 - α prediction intervals with exact finite-sample coverage guarantees.
Geostatistical Kriging and Spatial ML models generate prediction intervals that heavily rely on Gaussian errors and spatial stationarity assumptions. In real-world spatial data (climate modeling, real estate pricing, epidemiology):
spconform)Conformal prediction converts point predictions into valid prediction intervals with exact finite-sample guarantees:
`P(Y_new ∈ C(X_new)) ≥ 1 - α`
The spconform package extends split conformal inference to spatial and spatio-temporal domains:
library(spconform)
library(sf)
# 1. Fit your preferred spatial regressor (e.g., Kriging, Spatial RF, GAM)
spatial_mod <- fit_spatial_model(log_price ~ sqft + bedrooms, data = train_data)
# 2. Generate Conformal Prediction Intervals with 95% Finite-Sample Guarantee
conformal_out <- spconform(
model = spatial_mod,
calibration_data = calib_data,
test_data = test_data,
coords = c("longitude", "latitude"),
alpha = 0.05,
method = "spatial_adaptive" # Local spatial variance adjustment
)
# 3. Visualize Spatially Adaptive Uncertainty Map
plot(conformal_out, type = "interval_width")
Open for Discussion & Community Feedback
We are excited to share spconform with the R and Spatial Statistics community!