r/RStudio • u/nbafrank • 37m ago
r/RStudio • u/Peiple • Feb 13 '24
The big handy post of R resources
There exist lots of resources for learning to program in R. Feel free to use these resources to help with general questions or improving your own knowledge of R. All of these are free to access and use. The skill level determinations are totally arbitrary, but are in somewhat ascending order of how complex they get. Big thanks to Hadley, a lot of these resources are from him.
Feel free to comment below with other resources, and I'll add them to the list. Suggestions should be free, publicly available, and relevant to R.
Update: I'm reworking the categories. Open to suggestions to rework them further.
FAQ
General Resources
Plotting
Tutorials
- Erik S. Wright's Intro to R Course: Materials from a (free) grad class intended for absolute beginners (14 lessons, 30-60min each)
- Julia Silge's YouTube Channel: Lots of videos walking through example analyses in R and deep dives into
tidymodels(~30min videos) - The Swirl R package: Guided tutorial series going over the basics of R (15 modules, 30-120min each)
- Harvard’s CS50 with R: MOOC with seven weeks of material, including lectures, homework, and projects
Data Science, Machine Learning, and AI
- R for Data Science
- Tidy Modeling with R
- Text Mining with R
- Supervised Machine Learning for Text Analysis with R
- An Intro to Statistical Learning
- Tidy Tuesday
- Deep Learning and Scientific Computing with R
torch - The RStudio AI Blog
- Introduction to Applied Machine Learning (Dr. John Curtin, UW Madison)
- Examples of
kerasin R (courtesy of posit) - Machine Learning and Deep Learning with R (Maximilian Pichler and Florian Hartig, targeted at ecologists)
R Package Development
Compilations of Other Resources
r/RStudio • u/Peiple • Feb 13 '24
How to ask good questions
Asking programming questions is tough. Formulating your questions in the right way will ensure people are able to understand your code and can give the most assistance. Asking poor questions is a good way to get annoyed comments and/or have your post removed.
Posting Code
DO NOT post phone pictures of code. They will be removed.
Code should be presented using code blocks or, if absolutely necessary, as a screenshot. On the newer editor, use the "code blocks" button to create a code block. If you're using the markdown editor, use the backtick (`). Single backticks create inline text (e.g., x <- seq_len(10)). In order to make multi-line code blocks, start a new line with triple backticks like so:
```
my code here
```
This looks like this:
my code here
You can also get a similar effect by indenting each line the code by four spaces. This style is compatible with old.reddit formatting.
indented code
looks like
this!
Please do not put code in plain text. Markdown codeblocks make code significantly easier to read, understand, and quickly copy so users can try out your code.
If you must, you can provide code as a screenshot. Screenshots can be taken with Alt+Cmd+4 or Alt+Cmd+5 on Mac. For Windows, use Win+PrtScn or the snipping tool.
Describing Issues: Reproducible Examples
Code questions should include a minimal reproducible example, or a reprex for short. A reprex is a small amount of code that reproduces the error you're facing without including lots of unrelated details.
Bad example of an error:
# asjfdklas'dj
f <- function(x){ x**2 }
# comment
x <- seq_len(10)
# more comments
y <- f(x)
g <- function(y){
# lots of stuff
# more comments
}
f <- 10
x + y
plot(x,y)
f(20)
Bad example, not enough detail:
# This breaks!
f(20)
Good example with just enough detail:
f <- function(x){ x**2 }
f <- 10
f(20)
Removing unrelated details helps viewers more quickly determine what the issues in your code are. Additionally, distilling your code down to a reproducible example can help you determine what potential issues are. Oftentimes the process itself can help you to solve the problem on your own.
Try to make examples as small as possible. Say you're encountering an error with a vector of a million objects--can you reproduce it with a vector with only 10? With only 1? Include only the smallest examples that can reproduce the errors you're encountering.
Further Reading:
Try first before asking for help
Don't post questions without having even attempted them. Many common beginner questions have been asked countless times. Use the search bar. Search on google. Is there anyone else that has asked a question like this before? Can you figure out any possible ways to fix the problem on your own? Try to figure out the problem through all avenues you can attempt, ensure the question hasn't already been asked, and then ask others for help.
Error messages are often very descriptive. Read through the error message and try to determine what it means. If you can't figure it out, copy paste it into Google. Many other people have likely encountered the exact same answer, and could have already solved the problem you're struggling with.
Use descriptive titles and posts
Describe errors you're encountering. Provide the exact error messages you're seeing. Don't make readers do the work of figuring out the problem you're facing; show it clearly so they can help you find a solution. When you do present the problem introduce the issues you're facing before posting code. Put the code at the end of the post so readers see the problem description first.
Examples of bad titles:
- "HELP!"
- "R breaks"
- "Can't analyze my data!"
No one will be able to figure out what you're struggling with if you ask questions like these.
Additionally, try to be as clear with what you're trying to do as possible. Questions like "how do I plot?" are going to receive bad answers, since there are a million ways to plot in R. Something like "I'm trying to make a scatterplot for these data, my points are showing up but they're red and I want them to be green" will receive much better, faster answers. Better answers means less frustration for everyone involved.
Be nice
You're the one asking for help--people are volunteering time to try to assist. Try not to be mean or combative when responding to comments. If you think a post or comment is overly mean or otherwise unsuitable for the sub, report it.
I'm also going to directly link this great quote from u/Thiseffingguy2's previous post:
I’d bet most people contributing knowledge to this sub have learned R with little to no formal training. Instead, they’ve read, and watched YouTube, and have engaged with other people on the internet trying to learn the same stuff. That’s the point of learning and education, and if you’re just trying to get someone to answer a question that’s been answered before, please don’t be surprised if there’s a lack of enthusiasm.
Those who respond enthusiastically, offering their services for money, are taking advantage of you. R is an open-source language with SO many ways to learn for free. If you’re paying someone to do your homework for you, you’re not understanding the point of education, and are wasting your money on multiple fronts.
Additional Resources
- StackOverflow: How to ask questions
- Virtual Coffee: Guide to asking questions about code
- Medium: How to be great at asking questions
- Code with Andrea: The beginner's guide to asking coding questions online
- The u/Thiseffingguy2 r/RStudio post
r/RStudio • u/majorcatlover • 5h ago
How to merge time columns?
I have to merge two datasets that include onsets and offsets of two events - when person A did X and when person B did y. I want to merge them on the onsets and offsets per pairs to see what they were doing at the same times.
DF1
ID | X_onset | X_offset | X_activity
001 | 120 | 135 | watering plants
001 | 137 | 143 | reading
DF2
ID | X_onset | X_offset | X_activity
001 | 139 | 150 | talking
001 | 170 | 189 | watching TV
Only the ones that temporally overlap should be in the merged dataset.
r/RStudio • u/No-Sector4631 • 4h ago
Dicas de projetos/portfólio
Olá pessoal! Sou biólogo e estou aprendendo R para algumas demandas da minha empresa, gostaria de saber se tem alguém nessa área e dicas de como montar um projeto ou portfólio misturando esses dois mundos.
Basicamente eu uso o R para analisar a suficiência amostral das espécies quando realizamos um inventario
r/RStudio • u/Fawful_Chortles • 11h ago
RStudio Desktop 2026.06.0+242 “Blue Plumbago” on Ubuntu Jammy fails to start properly. Environment: R 4.3.3 installed at /usr/bin/R, R_HOME resolves fine to /usr/lib/R. RStudio itself is Desktop, not Server.
Originally the app would crash immediately, with "Main window closed unexpectedly" showing up in rdesktop.log, plus an IpcError: getStartupErrorInfo about setting innerHTML on null. There's also an older, possibly unrelated error in rsession log about discoverR failing with "system error 2 (No such file or directory)" but that timestamp is weeks stale and doesn't update on new launch attempts, so it might not be the real issue.
Every launch also throws a GLib-GIO-CRITICAL warning about g_dbus_proxy_new and G_IS_DBUS_CONNECTION failing, but that seems to be harmless noise unrelated to the crash.
What I've tried so far: confirmed R is installed and on PATH (which R, R --version, R RHOME all work fine). Set RSTUDIO_WHICH_R=/usr/bin/R, no change. Ran rstudio --verbose-init, got nothing extra in the output besides the GLib warning. Ran rstudio --disable-gpu and that actually changed something — the window now opens and stays open instead of crashing, but it's still not functioning correctly once open.
Has anyone run into this with RStudio Desktop 2026.06.0 on Ubuntu, either the Electron/GPU crash or the discoverR error? Trying to figure out if this is a known bug with this release or something specific to my setup.
r/RStudio • u/Technical_Soup9347 • 2d ago
When is it worth turning an analysis into a Shiny app vs. just shipping a report?
I keep hitting the same decision: a one-off analysis is fine as a Quarto report, but the
moment stakeholders start asking "what if we change X?", it's usually time for a Shiny
app so they can explore it themselves — on a reproducible R backbone so the app and the
analysis don't drift apart.
Some interactive R examples I've collected: https://rverseanalytics.com/
Where do you draw the line between report and app?
r/RStudio • u/Ignatu_s • 4d ago
seekr 0.2.0 is on CRAN: a programmable, inspectable search-and-replace workflow for R
r/RStudio • u/Sufficient_Piece_898 • 4d ago
Is this course good for learning r?
also is this too much for an econ major? total newbie btw
if not then what courses might you suggest?
r/RStudio • u/qol_package • 5d ago
qol 1.3.3: Update brings yet another ‘if’ and new tabulation features
r/RStudio • u/SubPar-Sprout • 7d ago
Coding help Help with long form dats
Hi! I've got some experience with R, but haven't dealt with a dataset like the one I'm working on at the moment before. I've got long form data consisting of subject ID, questionnaire name, questionnaire score & date questionnaire was answered. The address multiple responses to 2 different questionnaires over time. I need to summarise the scores for specific time windows, for example, how many people scored 1 or 0 in Qu1 and less than 3 in Qu2 by week 4, week 12, week 26.
Probably a silly question, how do I do that with this data? I've added windows but I get multiple responses in each window when I pivot the data to wide form for analysis. How do I select the lowest score for each questionnaire, occurring at the same date as each other within the window?
Sorry for the essay and their very much.
r/RStudio • u/Meif_42 • 7d ago
Coding help Trying to use R for my thesis, but ran into a problem 5 secons into it
EDIT: SOLVED
I figured before importing my data, I'd follow along a tutorial to get some basics down at least. I added up numbers, worked. Then tried to assign values to variables, and the programme just crashes every time as seen in my screenshot. Tried reinstalling R-studio, tried deleting some of the folders which I found might be a solution, but it keeps happening.
I'm just a beginner and maybe there's a very simple solution to this, but either way I'd appreciate any pointers on how to solve this, as for now I see no way to even work with this tool like this.
r/RStudio • u/plant_gen • 7d ago
Need suggestions for RStudio themes and other software for R
I am using R studio and tried different themes such as Dracula... etc.. . The thing is I don't get a feel similar to VScodium or Jupyter. Most themes are messing with graphs pane or the fonts colour palletes are not good. I need suggestions for both dark and light themes for latest versions of R studio.
I am also curious about alternatives for R studio, which are similar to Jupyterlab or something that has clean ui.
r/RStudio • u/godoufoutcasts • 7d ago
The Missing Piece in R's ML Ecosystem : GPU-Accelerated Gaussian Processes (A bottleneck compared to Python)
r/RStudio • u/Technical_Soup9347 • 8d ago
Made a free 15-part "R Foundations" video course — every lesson has the code and a run-it-in-your-browser console
I put together a free beginner R course: 15 short video lessons that go from using R as a calculator to data frames, reading a CSV, writing functions, packages, dplyr and the pipe.
What might make it useful vs. the usual videos: each lesson pairs the screencast with the exact code, a downloadable .R script, and a live webR console right on the page — so you can edit and run everything in the browser, nothing to install. All lessons have English subtitles.
The videos are going up on YouTube, and the full course with the interactive consoles is on the site:
- Course: https://rverseanalytics.com/courses/r-foundations.html
- YouTube: https://youtube.com/@rverseanalytics
It's all free and open. Happy to hear feedback on the lessons — and what topics you'd want covered next.
r/RStudio • u/Fresh_Coyote312 • 8d ago
Base R (graphics) vs Tidyverse
Curious what others prefer. I’ve actually been trending towards base R graphics lately.
r/RStudio • u/Choice_Number3711 • 8d ago
Learning Financial Risk Analysis with R
What are some good resources to learn Financial Risk Analysis techniques while at the same time learn how to apply the same in R.
Any specific libraries, books, tutorials that can help a someone like me (knowing nothing in Financial Risk Analysis but competent in R) to learn the aforementioned.
Thanks!
r/RStudio • u/qol_package • 9d ago
qol: New Graphic Framework From Scratch Reaches Alpha Stage
r/RStudio • u/NewmarketHero007 • 10d ago
Not allowed to change R versions, greyed out
I'm trying to restart Rstudio on my new laptop the different options are greyed out. I don't know how to get it to run.
If I click the 64-bit version I get this error:
An error occurred while attempting to load the selected version of R. Please select a different R installation.
But it won't let me click the 32-bit version and I don't know what to scroll down otherwise as it's empty.
I tried restarting my laptop and reinstalling R.
r/RStudio • u/Spiritual_Resolve_55 • 11d ago
Started grad school and somewhat new to R. what is a good workflow and best way to organize scripts?
Im in my first year of my masters and have all of my data now. Im doing wildlife biology and working with 20 years of GPS collar data (looking at movement/migration).
Im overwhelmed with where to start. I know the basics of R like uploading data, adding new columns, deleting columns, changing names... basic things like that.
But what is a typical workflow?
Data cleaning ---> data prep (getting your data set ready for models?) --> statically analysis/running models?
I guess I just get confused on the most efficient workflow.
What has yours been? How have you organized your scripts? Do you use R projects?
I guess im looking for any tips for someone who is in the beginning of their analysis and doesn't want to get stuck wasting time on things that can be quick to figure out.
Thank you!
r/RStudio • u/PuzzleheadedLeave540 • 10d ago
R Project Doubt
i recently did an R project analysing the LG ipo. it's a very basic project since I'm only familiar with base R. But i don't know how exactly a project is supposed to be made. do i write in the first person? do i explain my code? i have formatting and wording doubts.
If anyone can share a project/link to show me what these kind of projects generally look like I'd be truly very grateful.
Thank you!
r/RStudio • u/Distinct_Squash7110 • 11d ago
what’s the best way to practice R
i’ve been learning R for about three months using R4DS textbook, I covered a good portion but i still don’t feel like i’ve mastered it, at least not to the level where i can add it to my resume. what’s the best way to practice R and what are the most important skills/packages that i should focus on. for context, i’m learning it for my masters thesis and for a potential PhD in a few months.
r/RStudio • u/turbo-kseries • 10d ago
Coding help Packages
Can y'all help me with the best packages for data visualization and statistical analysis? thank you.
r/RStudio • u/Ill_Proposal9575 • 12d ago
Coding help Newbie
Hey guys, is there any free online courses that offer RStudio lesson? I wanna learn like from the basic. Goin on for my masters degree and I cannot just copy and paste chunks like what I did during my bachelor years. (Ps: I really dont have any coding skills, I've learned R coz my friend wants me to go with her to a "statistical workshop")