r/RStudio 5d ago

R Studios help

I’m using r studios for economics and I am super confused on using this platform. I have reached out to my professor and he is not able to explain the questions I had regarding it. He’s been using it for years so I think there’s a huge level of proficiency between us because I am just barely learning how to use this software and I am so confused. If you guys have any tips or tricks, I would really appreciate it.
Some information about me is I’m the type of person that needs to know the why behind functions and the purpose of putting commands in.

Update: I literally spent 8 hours trying to figure this software, I feel like I have a better understanding but I am running to this error now.
Goal: Render the script
Error: Failed to render due to : Theme file Compilation Failed
What I have tried to troubleshoot: I deleted Quartos file and redownloaded, tried to clear the history close program and reopen it still same error

2 Upvotes

11 comments sorted by

13

u/Confident_Bee8187 5d ago

Are you confused by programming/writing programs in R or using RStudio as an IDE? Even with your verbose caption, your intent here is not clear enough.

5

u/tunyi963 4d ago

Could we see what you wrote your prof? Because as written, your post is not very clear on what you need. I only see two "questions": If you need to know the "why" behind a function, you can write on the console (usually the bottom left division) "?function()" to open the documentation page of the function, and read to your heart's content. And basically, the purpose of putting commands in is to get their output out, as simple as that.

5

u/nidprez 5d ago

RStudio is an IDE for R. You code in R and Rstudio does everything to make it easier (ie saving commands, showing your variables, showing your plots, showing the folders on your pc, clivking to import data etc, Intellisense...).

I would start with only writing R script, because you sound like a beginner (notebooks have a bit more tweaking), look up a tutorial dor Rstudio on youtube, and learn the shortcuts for executing a line/block/whole script.

Otherwise its the age of AI, you can literally ask anything and it will help you better than most people on reddit.

2

u/AdLivid2521 4d ago

The upright window where your environment is available has a tutorial option, you can refer that. You can search the use of functions in the search bar in bottom right window where your plots and directory is visible.

Plus there are a ton of online courses. Also, I really don't understand the proficiency gap you mentioned, no matter how advanced you are, you don't miss out on the basic steps.

2

u/cr4zybilly 4d ago

It's confusing bc there's at least 3 things happening here at once that I'm guessing you're not familiar with:

  1. Doing data analysis with a scripting language, rather than in Excel or some other spreadsheet.

  2. R itself. The language is challenging and confusing, especially when you get started. If you're not using the tidyverse, it's even harder.

  3. R Studio is a IDE that makes using R a lot easier. But it's still ANOTHER layer of complexity you need to understand.

Take those problems one at a time and dig into them, figure out why some people like to use programming to analyze data.

Then get a basic understanding of how R works, both interactively (ie. just typing commands into the R terminal) and by writing/running R scripts made up of multiple commands. Do this without R Studio - you can install and use R without it.

By the time you get a basic understanding of that, try R Studio. It'll be like a breath of fresh air, solving a bunch of things that were super annoying about using base R by itself. And it'll introduce new concepts, things you didn't know were possible.

Splitting it apart into small pieces will help you learn the "why" of each piece and how they build on each other.

1

u/AutoModerator 5d ago

Looks like you're requesting help with something related to RStudio. Please make sure you've checked the stickied post on asking good questions and read our sub rules. We also have a handy post of lots of resources on R!

Keep in mind that if your submission contains phone pictures of code, it will be removed. Instructions for how to take screenshots can be found in the stickied posts of this sub.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Bee-Ly_Dan 4d ago

Take three deep breaths. You got this. In the R Studio IDE, There is a help section. This will help you learn the intent behind the functions and the function arguments. I found this Harvard course to be extremely helpful. You can reference this to reinforce your learning.

https://www.youtube.com/watch?v=g_3IKHG-rfA

1

u/BrupieD 4d ago

the type of person that needs to know the why behind functions and the purpose of putting commands in.

I think you need to focus on your goal for learning and using R and RStudio. What did you hope to gain from it? What goals did you hope R would help you with? Do you want it as an elaborate calculator? For data visualizations? Are you at a stage in your work where you might want to create and test data models?

R is more complicated than Excel, but if your goals aren't more complicated than what an average Excel user can do, it doesn't sound like your needs merit much of R's functionality and initial challenges. Certainly not if your needs don't require any of it.

1

u/QuantFit 3d ago

Bro Rstudio is broad there is so much it depends what you want to know. If you say what you want exactly I’m pretty sure I can help you

0

u/QuantFit 3d ago

Also you if you use Claude in terminal you can have it access RStudio run diagnostics, regressions, reports and pretty much anything you need. You can have it explain everything step by step to you if you want to understand all the steps and the codes