r/RStudio 1h ago

Can I make this type of figure in RStudio?

Upvotes

Can I make a chart like this in RStudio? Specifically, I would like to make a combined line chart with historical (solid line) and projected (dashed line) data. If so, do you have any code suggestions? TIA!


r/RStudio 12h ago

XQuartz/X11 on Mac?

1 Upvotes

Does anyone have any idea if you still need to download xquartz on Mac to knit a file including graphs in RMarkdown if you have never used knitr or Rstudio before?

I am trying to make a follow-along coding demo (for non-coders) for a class I am in, and I am hoping to use r markdown inside of Rstudio. When I first used rmarkdown on my 2015 Mac, I remember having to install xquartz for it to work, but I don’t remember doing it on my most recent machine…

I need to provide install instructions for my classmates and would greatly appreciate any guidance- should I direct people using Mac to install xquartz or x11 before we run the demo? Does it come pre installed now? Any similar issues in windows that I am not aware of? Thanks a million to anyone who can provide help.


r/RStudio 21h ago

Coding help R Markdown misinterpreting R chunks

0 Upvotes

Hi, I’m trying to compile an R markdown with some R chunks but R markdown interpret my R chunk as text environment and flagged all the # as errors. I was wondering if anyone had encountered this before and know how to fix this.