Skip to main content
The 2025 Annual Developer Survey is live — take the Survey today!

R Language Collective

A collective where data scientists and AI researchers gather to find, share, and learn about R and other subtags like knitr and dplyr.
516.3k Questions
+97
13.5k Members
+64
Contact

Pinned Bulletins

View all 1 bulletins

R Language has some news to share

Bulletin
1 min read
2k views

Welcome to the R Language Collective

Pinned content

View all 3 collections

R Language admins have deemed these posts noteworthy.

Pinned
18 votes
3k views
Collection

R Language Frequently Asked Questions

The questions that get asked repeatedly, gathered together in one place. What’s a question every R programmer asks at some point? Add it here! Grab questions from the r-faq tag to get them added ...
Berthold's user avatar
  • 101
Pinned
49 votes
4k views
2 minute read
How-to guide

How to write a good R question with a reproducible example

This article is largely written based on https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example When posting a question to Stack Overflow, you should include a minimal ...
user avatar

Can you answer these questions?

View all unanswered questions

These questions still don't have an answer

0 votes
0 answers
18 views

Making data.frames of different lengths the same length based on same values in one column across data.frames (or: how to manage subsetting)

I am working with 14 data.frames, each is a year's worth of crime data from NIBRS. The files are titled NIBRS2010, NIBRS2011 . . . NIBRS2023. Each of them has a different number of observations, but ...
1 vote
0 answers
32 views

Control the size of the output plot in R notebook in Positron

I want to control the size of the output plot in Positron in R ipynb notebooks. In RStudio in markdown, I would start the chunk with {r fig.width=9,fig.height=5} and I could resize the plot to fit my ...
2 votes
0 answers
34 views

R expressions for branch labels in `rpart` object

Given an rpart object representing a classification tree, I want to represent each split in the tree as an expression in R syntax. This is almost possible using the labels generated by plotting or ...
1 vote
0 answers
31 views

Run reticulate::py_require() once on package installation

We have an internal python library that we want to build an R wrapper for. The python package only needs to be installed once and not every time. The documentation says to use py_require() over ...
1 vote
0 answers
29 views

shinybusy does not work in bslib::page_navbar

I would like to use the shinybusy package to display a custom GIF as busy indicator at start up. While it works well in a fluidPage, using bslib::page_navbar throws an error : Here the code I used, ...

Learn something new
These are the most recent articles in R Language Collective
49 votes
4k views
2 minute read
How-to guide

How to write a good R question with a reproducible example

This article is largely written based on https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example When posting a question to Stack Overflow, you should include a minimal ...
user avatar
20 votes
3k views
3 minute read
How-to guide

Create multiple PDF/HTML reports using R Markdown in a loop

How to create multiple PDF/HTML reports in a loop using R Markdown With R Markdown, creating a PDF or HTML report is straightforward. But what if you want to create various reports? Furthermore, what ...
Guibor Camargo Salamanca's user avatar