r/Rlanguage Feb 11 '26

Please post to r/rstats !

82 Upvotes

r/Rlanguage is closed for new posts so we can have one big R community on Reddit, instead of a bunch of smaller ones. Please post to r/rstats instead.


r/Rlanguage 7d ago

The Missing Piece in R's ML Ecosystem : GPU-Accelerated Gaussian Processes (A bottleneck compared to Python)

32 Upvotes

There was a recent thread asking what Python packages R lacks, and I wanted to highlight a massive architectural bottleneck I recently ran into while building a robust local ML tuning pipeline.

The Problem: R currently has no native, highly scalable, GPU-accelerated Gaussian Process library for Bayesian hyper-parameter tuning.

When tuning models like XGBoost, I noticed that frameworks like mlr3mbo completely sidestep this problem.

The moment search space includes integer parameters (like max_depth or nrounds), mlr3mbo silently abandons the Gaussian Process and swaps the surrogate model to a Random Forest. This is fast, but I want Gaussian Process.

To get that precision, I built a custom tuning engine using a pure Gaussian Process (via rBayesianOptimization).

The Bottleneck:

Because the native Gaussian Process math is trapped on the CPU using standard LAPACK Cholesky decompositions, it scales at O(N^3). As my tuning rounds push past 100+ evaluations, a massive hidden delay occurs. The actual XGBoost DART model trains blazing fast on my RTX 2060 in just 30 seconds (sourced built with CUDA).

But then, the script hangs for 3 to 4 minutes maxing out a CPU core just doing the matrix math to guess the next parameter point. And because of that O(N^3) scaling, this hidden CPU delay grows exponentially worse with every single round (Guessing at the moment).

The Python Comparison:

I personally do not use Python, but from what I understand, this is a completely solved problem in their ecosystem. Libraries like GPyTorch and BoTorch treat the Gaussian Process matrix algebra as CUDA tensors natively, allowing them to evaluate thousands of points in seconds by parallelizing the math across the GPU.

My Question to the Community:

Does anyone know if there are plans to port something like GPyTorch into R's native torch package? Or is anyone working on Rust-backed (extendr) Gaussian Process solvers for R that can utilize GPU acceleration for these massive matrices?

I feel like a highly scalable GPU-accelerated Gaussian Process is the biggest missing piece keeping R from having a truly state-of-the-art, ML tuning ecosystem.

Who is building the solution?


r/Rlanguage 9d ago

How to do a vector graph with quanteda

2 Upvotes

Hello everyone,

I use quanteda in R to do some lexicometric analysis for my PHD thesis and I fund myself in a bit of a deadend

I need to do a graph showing textual co-occurences (which quanteda and igraph allow to do)

My problem is that the topfeatures() command has been removed for valid reasons, but it led me from failure to failure

My fmc is too big to be represented by a graph, and without the topfeatures() command I cannot select the terms that could bring my fmc to a more manageable size.

Does any of you have any solution to this problem?

Idk if I explain it clearly, I'm still learning by practice

Thanks in advance


r/Rlanguage 14d ago

Will I have issues running multiple scripts at once?

2 Upvotes

I have a modeling script that needs to be run in R that can take sometimes a few days to complete when I'm including multiple versions of the models but can just be run in the background. I also have other projects that need to be worked on where I'm editing and running the script as I go, but I'd like to avoid waiting for the modeling script to finish. If I use seperate sessions is this likely to cause issues? As far as I'm aware the packages I'm using are not using multi threading but I am working with large dataset (in the modeling script, usually not that large in the other projects) that would assumedly be using up a lot of ram just to load.


r/Rlanguage 19d ago

How I find spelling mistakes

Thumbnail i.imgur.com
62 Upvotes

r/Rlanguage 20d ago

Very basic question: where does D3.js fit with R/Shiny?

9 Upvotes

i've been building some simple medical dashboards in shiny.... mostly for filtering data and making interactive plots. I’m not a web developer, but I’m trying to slowly understand how better data visualization tools work together

recently saw a developer influencer talking about D3.js, HTML, CSS, and JavaScript, and got me wondering bout it

guys who use Shiny: when does D3.js actually become useful?

is it mainly for making very custom visuals that normal R packages can’t handle well? Or is it usually too much work unless you are building a serious web app? not gonna replace my r workflow but i’m just wondering whether D3.js is useful

Would love to hear simple examples of when D3 was worth it, and when it was not.


r/Rlanguage 25d ago

Swayam Course on "Basic Statistics using GUI-R" from BHU by ex IIM faculty

1 Upvotes

Hi everyone!

I'm part of the team behind a new FREE SWAYAM (Government of India) course offered by Banaras Hindu University (BHU) called "Basic Statistics Using GUI-R." I thought this community might find it useful.

The instructor is Dr. Harsh Pradhan, Assistant Professor at FMS, Banaras Hindu University, with a PhD from IIT Bombay, MBA from IIT Delhi, and previous teaching experience at IIM Bodh Gaya and OP Jindal Global University.

One thing we've noticed is that many students and professionals want to get into data analytics, research, finance, or business analytics, but are often discouraged because they think statistics or programming is too difficult.

This course is designed to address exactly that.

What you'll learn

  • Basic Statistics from the ground up
  • R using a beginner-friendly GUI (no prior coding knowledge required)
  • Practical concepts used in Data Analytics, Market Research, Financial Analysis, and Academic Research

Why it may be worth your time

  • ✅ Completely FREE to enroll
  • ✅ No prior coding or statistics background required
  • ✅ 8-week self-paced SWAYAM course
  • ✅ Optional Government certification exam (with the possibility of earning 2 Academic Bank of Credits)

📅 Course starts: 24 August 2026

📌 Enrollment closes: 15 September 2026

Course page:
https://onlinecourses.swayam2.ac.in/e-learning/preview/ini26_mg16

If you're looking to build a solid foundation in statistics before moving into data science, analytics, research, or higher studies, I genuinely think this would be a good starting point.

Happy to answer any questions about the course!

 


r/Rlanguage 28d ago

R in Pharma Quality Control Labs

6 Upvotes

I'm looking for anyone that has tried R+RStudio in a pharmaceutical Quality Control lab and is willing to share the experience. I'm talking things like Analytical Method Validation, Stability Stydies, managing Control Charts and so on. In our company, we, the stats team, face several questions when introducing the ideia and for some of those we have hard time finding an argument/solution. Yes, I'm aware of initiatives like rinpharma, we just have not been able to build from those alone.

Also, in case anyone wonders, at the current moment we don't have any sort of statistical software approved for use. We do any analysis that need to be done in R (ggplot2 for plots, quarto for reports, and on, and on...) in such non formal way.


r/Rlanguage 28d ago

I’m trying to find the boring R scripts that are secretly worth money

0 Upvotes

I’m working on an experimental way to make some existing R workloads faster.

Not “rewrite your whole pipeline in Rust/Julia/C++/Spark” and then pretend it was convenient, but closer to:

you already have R code
it already works
people depend on it
but it is annoyingly slow
and making it 2–4x faster would actually matter

The part I’m trying to understand is not whether R can be made faster in theory. That debate has existed forever.

The question is more practical:

Where are the or are there at all R scripts that are slow enough to hurt, but important enough that nobody wants to rewrite them?

I’m especially curious about boring, expensive, real-world R:

  • recurring pharma / biotech reports
  • clinical statistics workflows
  • bioinformatics analysis scripts
  • insurance risk models
  • finance / quant / backtesting jobs
  • Monte Carlo simulations
  • bootstrap-heavy analysis
  • regulatory reports
  • Shiny apps people actually use
  • internal company scripts that “just run overnight”
  • old but valuable R code nobody wants to touch

My suspicion is that the valuable use cases are not the glamorous ones.

They are probably some ugly internal script written by a very smart person five years ago, now running every week, quietly wasting hours, and everyone is afraid to modify it because it produces numbers that matter.

So I’m asking:

  1. Have you seen R scripts where a 2–4x speedup would create real value?
  2. What kind of workload was it?
  3. Was the bottleneck actually R execution, or mostly I/O, databases, bad code, package internals, or waiting on external systems?
  4. Would faster execution be worth budget in your world, or would people just say “nice” and continue suffering?
  5. Are there industries or use cases I’m missing where slow R quietly costs real money?

I’m trying to understand whether this is a real commercial pain or just an interesting technical itch.

Anonymized war stories very welcome.


r/Rlanguage 29d ago

Properly installing selfmade package from selfhosted gitlab

5 Upvotes

I made a package with a few functions for my collegues at work. Its supposed to be easy to use. We have a gitlab server where i put my repository on.

Lets say the link to the repository is the following:

https://gitlab.mywork.com/myprofile/mypackage/

What code would i give my collegues so they can install this easily without errors and without installing packages beforehand?

Currently i have:

install.packages("https://gitlab.mywork.com/myprofile/mypackage/-/raw/master/package.tar.gz")

It installs, but also throws the error:

tar.exe: Error opening archive: Failed to opentar.exe: Error opening archive: Failed to open

for some reason. Does anyone know the proper way to do this?


r/Rlanguage Jun 21 '26

R well

0 Upvotes

r/Rlanguage Jun 17 '26

ggplot2: Why would you call it aesthetics?

0 Upvotes

Aesthetics are personal, ideological, cultural or other preference-systems, not single qualities of an object.

Merriam-Webster states:

aesthetic · noun
aes·​thet·​ic
a particular theory or conception of beauty or art : a particular taste for or approach to what is pleasing to the senses and especially sight

Deciding to call the x / y variables "aesthetics" instead of (graphical) "features" or "visuals" is unnecessary. Every package has its own language that you have to learn, but, and this is the worst part, they don't even give you an Anki-deck!

Thanks for reading my mini-rant.


r/Rlanguage Jun 15 '26

Profiling, Vectorization, and Rcpp

Thumbnail slicker.me
2 Upvotes

r/Rlanguage Jun 12 '26

R

0 Upvotes

r/Rlanguage Jun 10 '26

[ Removed by Reddit ]

1 Upvotes

[ Removed by Reddit on account of violating the content policy. ]


r/Rlanguage Jun 06 '26

Historical Weather

12 Upvotes

Is there a good package to get historical weather I was using openmeteo but not working now after upgrading to R 4.6.0. is there a better package to get historical weather based on gps cords?


r/Rlanguage May 29 '26

Any suggestions to install r packages in other linux distros

11 Upvotes

I'd love to use fedora, opensuse (my main driver for a long time), debian or any non-Ubuntu-based distros. I can install R-cran easily in any linux distros, however, inside R environment, when installing packages such as ggplots, it took quite a long time for processing, then the problems show "non zero exist status". I have tried many different distros and come up with the same problem....cannot install any packages. Finally, I found the solution and it only worked on Ubuntu LTS, ironically =)))). It gave me no choice and now I use ubuntu mate for my work and study. To be fair, ubuntu mate is really good for me, no complain at all (excepting forcing to use snap). But still wonder, are there any ways to install r packages for any distros other than ubuntu lts?


r/Rlanguage May 27 '26

R publisher

0 Upvotes

can i click "Trust the publisher and install" in the poped window asking- Do you trust the publisher "REditorSupport"
is there any problem??


r/Rlanguage May 25 '26

Ai in R

8 Upvotes

Does anyone have any material into how i can use AI inside rstudio? Haven't found many intuitive tutorials so i came here looking for something mores straigth foward.


r/Rlanguage May 24 '26

Is there any way to select a column after piping?

12 Upvotes

This doesn't work:

filter(tibble, column1 == x, column2 < y) |> unique($column3)

so I have to do this instead:

unique(filter(tibble, column1 == x, column2 < y)$column3)

Why does the dollar sign not work after piping and is there any way to get around it, so I can use piping for this? It's just a lot faster to write this sort of stuff for me when piping since otherwise I feel I have to think in reverse.


r/Rlanguage May 18 '26

disproportionality analysis using R references

4 Upvotes

Can someone recommend specific books on pharmacovigilance disproportionality analysis using R? Specifically, I am looking for resources that demonstrate how to calculate the Proportional Reporting Ratio (PRR) and the Bayesian Confidence Propagation Neural Network (BCPNN) analysis


r/Rlanguage May 16 '26

Scientific Calculations with R Language # Rlanguagestatistics

Thumbnail youtube.com
2 Upvotes

R is a powerful programming language used for mathematics, statistics, data science, and scientific computing.
R can perform:

  • Basic arithmetic calculations
  • Scientific calculations.

r/Rlanguage May 15 '26

For Linux users, how do you deal with minor upgrades in r-base

10 Upvotes

I use R mainly on Linux, and one thing that keeps bothering me is how package libraries are tied to each R minor version. Every time r-base gets upgraded along the system I end up needing to recompile a large number of packages locally.

I understand the reasons behind this, but in practice it still feels quite inconvenient, so some times I reuse old library paths across versions in my scripts.

I’m curious how experienced Linux R users usually handle this workflow.


r/Rlanguage May 16 '26

R language

0 Upvotes

R is the easiest language to learn


r/Rlanguage May 15 '26

Population Model Support

Thumbnail platform.who.int
0 Upvotes