Skip to main content

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.2k Questions
+42
15k Members
+95
Contact

Pinned Bulletins

View all 1 bulletins

R Language has some news to share

Bulletin
1 min read
3k views

Welcome to the R Language Collective

Pinned content

View all 3 collections

R Language admins have deemed these posts noteworthy.

Pinned
20 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
5k 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
22 views

How can I programmatically determine the imports for an R function?

Suppose I have a function like the below in a large R script, and I am trying to refactor it into a package to make it re-usable in other scripts: mymean <- function(x) { assert_that(is.numeric(...
0 votes
0 answers
24 views

R package installation error - gfortran giving 'no input files' error

I'm setting up a conda environment to run R scripts in (and some python), and I have created the environment successfully and installed the relevant scripts (mostly). I'm trying to install some ...
2 votes
0 answers
38 views

Removing outside border line in R map

I am working on highlighting groups of counties within Ohio and while I am happy with where I have ended up overall, I have one aesthetic issue I cannot seem to solve (and it may not be solvable). ...
0 votes
0 answers
27 views

How to instantiate R6 class programmatically?

What is the right way of creating an object from a R6 class, programmatically (cannot find any solution around)? For example, with S4 I may do: testS4 <- setClass('testS4',slots = list(x='character'...
0 votes
0 answers
51 views

Alphabetical ordering of y-axis in complex ggplot2

I'm trying to make a line chart of the density of different species along a vegetation transect. There are two transects (Transect A and Transect B), which I would like to plot separately. "Cover&...

Learn something new
These are the most recent articles in R Language Collective
49 votes
5k 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