Skip to content
R in 3 Months Starts March 13. Learn More →
R for the Rest of Us Logo

Fundamentals of R

Bring It All Together (Quarto)

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Ally de Alcuaz

Ally de Alcuaz • September 29, 2023

How do you make sections?

Gracielle Higino

Gracielle Higino Coach • September 29, 2023

Hi Ally! Good question! Creating sections is a great way to organize your script. You can do that with the shortcut Ctrl+Shift+R (Cmd+Shift+R on the Mac). You can read more about sections and folding sections here: https://support.posit.co/hc/en-us/articles/200484568-Code-Folding-and-Sections-in-the-RStudio-IDE

Dalton Bailey

Dalton Bailey • April 9, 2024

Is there any control over fonts/font size? Or is everything in Quarto pretty much locked in as is?

David Keyes

David Keyes Founder • April 9, 2024

Nope! You can customize a ton! How you do so depends on the output format. Take a look at the lessons that started with "Making Your Reports Shine" in the Going Deeper lessons and you'll get examples of how to do so for PDF, HTML, and Word.

Lilly Kennedy

Lilly Kennedy • May 2, 2024

Is there a way to add comments into your code in quarto like there is with r script? since the # here is indicating a heading instead of a comment

Gracielle Higino

Gracielle Higino Coach • May 2, 2024

Hi Lilly! If you want to add a comment outside of code chunks, you can use the following notation:

<!--- your comment --->

This won't show in your rendering, and you can use that to review Quarto/Markdown documents from others. [= We have some Quarto documents that use comments in our #challenges-exercises channel on the Discord server. You can download them and render them to see what it looks like!

David Keyes

David Keyes Founder • May 2, 2024

Also, just to add: if you start a line in a code chunk with a hash sign, it will become a comment. Only text not in code chunks with a hash sign at the start becomes a header.

Raouf Kilada

Raouf Kilada • October 22, 2024

Hey David, I tried the ggplot that you used in your video:

ggplot(data = avg_r_enjoyment,
       mapping = aes(x = avg_enjoyment,
                     y = qcountry,
                     labeel = avg_enjoyment_two_digits)) +
  geom_col(fill="#6cabdd") +
  geom_text(hjust 1.2,
           color = "white",
           fill="black") +
  theme_minimal()

and I got this error:

ggplot(data = avg_r_enjoyment,
       mapping = aes(x = avg_enjoyment,
                     y = qcountry,
                     labeel = avg_enjoyment_two_digits)) +
  geom_col(fill="#6cabdd") +
  geom_text(hjust 1.2,
Error: unexpected numeric constant in:
"  geom_col(fill="#6cabdd") +
  geom_text(hjust 1.2"

any suggestions? Thanks

Gracielle Higino

Gracielle Higino Coach • October 24, 2024

Hi Raouf! It looks like there's an "=" missing after hjust. Can you try this instead:

ggplot(data = avg_r_enjoyment,
       mapping = aes(x = avg_enjoyment,
                     y = qcountry,
                     labeel = avg_enjoyment_two_digits)) +
  geom_col(fill="#6cabdd") +
  geom_text(hjust = 1.2,
           color = "white",
           fill="black") +
  theme_minimal()
Raouf Kilada

Raouf Kilada • October 24, 2024

Thank you...It worked