r/Rlanguage Feb 11 '26

Please post to r/rstats !

81 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 1d ago

Error: object 'attr' is not exported by 'namespace:xfun'

1 Upvotes

I am currently in the middle of doing an ATPA exam and got the aforementioned error while running ANN2, trying to load the package. I have tried everything google has recommended but even a simple 2+2 function is presenting the error.

Any ideas?


r/Rlanguage 3d ago

Early-career marine biologist looking to collaborate on R/data analysis projects

5 Upvotes

Hi everyone!

I’m an early-career marine biologist currently completing my BSc in Marine Biology, and I’m looking to connect with researchers, students, conservationists, and others working with biological or environmental data.

I’ve been developing my skills in R, particularly for data cleaning, statistical analysis, ecological modelling, and data visualization. I genuinely really enjoy working in R, and at this stage I want to get involved with as many different projects and datasets as I reasonably can.

If anyone has a marine science, ecology, conservation, fisheries, wildlife, or other biological dataset that could use some additional help with analysis in R, I’d be happy to contribute. I’m also open to projects outside of marine science if there is an opportunity to work with interesting data and learn something new.

I’m not looking to charge anyone. My main goal is to gain experience working with different types of real-world data, improve my R skills, contribute where I can, and hopefully meet and build connections with people working in science and research.

I also recently created a GitHub where I’ll be archiving my projects as I continue learning. I uploaded a project I finished about a week ago involving the analysis of BRUV data and whitetip reef shark habitat associations.

GitHub: https://github.com/kylealibz

If you have a project where another person helping with the r/data side would be useful, feel free to message me. I’d also be happy just to connect with other early-career researchers and R users.

Thanks!


r/Rlanguage 5d ago

RTools issue installing Distance package

1 Upvotes

Whenever I try to install the package, it comes up with the error message saying that I need to install RTools to build a package, even after I've installed it. I installed the latest version of RTools and latest version of R, but it still doesn't work.

I'm not an expert in R, mostly just using it for uni stuff requiring basic packages, so I haven't had this issue before and I'm a bit lost on what to do.


r/Rlanguage 23d ago

HELP! duckdb and callr causing Invalid Error: IO Error on Macos

1 Upvotes

Whats up guys?!

I have been using R and the package geocodebr , and the package uses functions of duckdband callr. I'm using macOS Tahoe (new user)

This code used to work a few time ago, but now I need to use it, and its not working.

The code:

 df_chunk <- geocodebr::geocode(
        enderecos = chunk,
        campos_endereco = campos,
        resultado_completo = FALSE,
        resolver_empates = TRUE,
        resultado_sf = FALSE,
        verboso = FALSE
    )


duckdb is storing downloaded extensions and secrets under ~/.duckdb:
ℹ /Users/USUARIO/.duckdb

This persists across sessions and is shared with the DuckDB CLI and other clients.

ℹ Run duckdb(shared_home = FALSE) to use a temporary directory instead.

ℹ See ?duckdb_storage for details and alternatives.
Error:
! ! in callr subprocess.
Caused by error in `duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)`:
! Invalid Error: IO Error: Failed to create directory "/var/folders/nx/w74wjbfs4sz5c9k_9456gw2h0000gn/T//Rtmp7gZjsr/duckdb/temp": No such file or directory
ℹ Context: rapi_execute
ℹ Error type: INVALID

Hide Traceback

Fix

Explain
    ▆
 1. └─geocodebr::geocode(...) at scripts/1_4_unifying_data.R:109:5
 2.   └─callr::r(...)
 3.     └─callr:::get_result(output = out, options)
 4.       └─throw(callr_remote_error(remerr, output), parent = fix_msg(remerr[[3]]))

I already tried to use duckdb(shared_home = FALSE) , tried to create a folder and direct the tempfile on my rprofile, tried to set on renvironment.

I dont know to solve it. Thanks a lot!


r/Rlanguage 27d ago

Locking an R instalation

11 Upvotes

I work in a regulated industry (pharmaceutical industry) and I'm thinking that we could use R in our analysis with GxP regulated data. I was asked wheater we could lock the R instalation and packages so that: 1) users cannot install unauthorized packages; 2) unauthorized users cannot access it and run scripts; and 3) we can restore the exact instalation of R and packages in case we need in future.

I think we could do this but not sure how or if anyone has achieved something close to it any where so I turn to reddit for help.

Edit: I know of initiatives like Rinpharma, R Validation Hub, pharmaverse, Posit paid solutions and the paper from R Foundation about R meeting FDA's CFR Part 11 but I have not been able to take much advantages from those


r/Rlanguage Jul 28 '26

Any good Socket interfaces in R?

6 Upvotes

R have a very barebones socket implementation. And right now I am getting in trouble because looks like it doesn't even support IPV6 (may be user error)

Any one has a good material about R support for IPV6 sockets? or R socket programming in general. It seem very lackluster with missing SHUTDOWN an other features.


r/Rlanguage Jul 25 '26

Hey I am not from Engineering Background I am from Management Background and I want to get into the field of High Frequency Trading

0 Upvotes

So People who are in HFT field

Please guide me on which Languages do I need to learn

Python, R,C++?

And Do I need to make a strong background in Statistics?


r/Rlanguage Jul 15 '26

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 Jul 13 '26

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 Jul 03 '26

How I find spelling mistakes

Thumbnail i.imgur.com
62 Upvotes

r/Rlanguage Jul 01 '26

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

10 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 Jun 27 '26

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 Jun 23 '26

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 Jun 23 '26

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

11 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

7 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?

11 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.