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.
513.5k Questions
+280
10.7k Members
+69
Contact

Pinned content

View all 3 collections

R Language admins have deemed these posts noteworthy.

Pinned
41 votes
3k 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
Pinned
17 votes
2k 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

Can you answer these questions?

View all unanswered questions

These questions still don't have an answer

0 votes
0 answers
5 views

Remove extra measurements within specific brackets per ID in R

I have a long dataset in which each participant should have 9 measurements, but they all have more than 9. These measurements need to be within specific brackets of the Weeks variable. Measurement 1 ...
0 votes
0 answers
8 views

Using rgl's extrude3d() function to make a 3D mesh from polygons in R

I'm trying to make a 3D OBJ file using R. My initial data is a Geopackage with multiple polygons. And I want to 'extrude' each polygon to make them 3d. The extrude amount should be determined by the ...
0 votes
0 answers
5 views

R Synthpop - Unable to write rules to ensure float1 <= float2 <= float3

I have been banging my head against synthpop rules for a few days now and I can't quite understand the documentation for defining rules. I needed float columns to obey these rules: float1 <= ...
0 votes
0 answers
8 views

Different outputs of marginaleffects::avg_prediction and ggeffects::ggeffect in R

I am running multinomial regression using nnet::multinom for a dataset where response and predictors are all factors. A sample of my data: df2 = structure(list(SOURC = c("dsint", "dsint&...
0 votes
0 answers
13 views

Use SMD or raw difference in proportions when comparing balance of binary covariates used in propensity matching?

I am a junior in the medical field, and have been tasked with performing a propensity matched analysis of some data, using R. I am looking at comparing the balance of my covariates (both before and ...

Looking for an extra challenge?

View all bountied questions

These questions have a bounty on them

1 vote
1 answer
39 views
+50

ROracle installation errors on EL8

I am trying to install ROracle package version 1.3-1.1 on R version 4.4.1. The OS is RHEL 8.9, kernel 4.18.0-513.24.1.el8_9.x86_64. I've installed Oracle client 23 including JDBC, ODBC and all ...
3 votes
1 answer
74 views
+100

SparkR: creating a Spark table with a nested data column

I'm working in Databricks trying to push data from an R notebook to Apache Spark where one column is nested data. Here's a working example without the nesting: library(SparkR) sparkR.session() d1 = ...

Learn something new
These are the most recent articles in R Language Collective
41 votes
3k 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
19 votes
2k 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