Skip to content
New course: Interactive Dashboards with Shiny. Get 50% off with coupon SHINYLAUNCH.
R for the Rest of Us Logo

This lesson is locked

Get access to all lessons in this course.

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.

Your Turn

Reuse the RMarkdown document you made in the last lesson. Then:

  1. Go into the YAML and change the title to “My Super Fancy Report.”

  2. Remove the line with the date from the YAML.

  3. Change the output format to HTML by changing output: word_document to output: html_document.

  4. Knit again and open report.html to make sure your changes show up.

Learn More

If you are really curious about why YAML is called YAML, here's the definitive answer.

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

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

Eduardo Rodriguez

Eduardo Rodriguez

March 22, 2021

Hi David,

Everything is working great, RMarkdown is a fantastic tool! However, I noticed that when I knit my code it automatically opens the file. It's not a bad thing but I am curious how I change the settings? In your video it doesn't automatically open.

Thank you,

Eduardo Rodriguez

Eduardo Rodriguez

Eduardo Rodriguez

March 23, 2021

Hi David,

Appreciate the quick response and simple solution!

Thank you,

Eduardo Rodriguez

Lindsay Quarles

Lindsay Quarles

October 1, 2021

As soon as I tried to edit the YAML everything went away and all I see is PK with two red dots. What did I do wrong?

David Keyes

David Keyes

October 1, 2021

Would you mind taking a screenshot and sharing the link using imgur.com or something similar?

Lindsay Quarles

Lindsay Quarles

October 7, 2021

I went through the instructions again for a third time and it worked! Not sure what I did wrong, but I got it right this time. Thanks David!

Hi David, I keep getting this error when trying to knit to a html document. I can knit to a word document just fine. I've all tried doing "install.packages("sass") and that didn't seem to fix the problem. Do you have any ideas for what could be causing this?

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘sass’ Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart Execution halted

Thanks,

Charlie Hadley

Charlie Hadley

March 24, 2022

Hi Sam! That's not an error I'd expect. Can you create a new .Rmd that contains only this and tell me if you get the same error?

---
title: "Animals analysis"
output: html_document
---

Test

Thanks, Charlie

Hey Charlie! Ya I'm getting the same error. Weird.

I'm getting the same error

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'sass' Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart Execution halted

Andrew Paquin

Andrew Paquin

March 19, 2023

Hi David, All of this worked for me, but I notice that my report did not open in a browser immediately as yours did. Instead, it opened in another window that included a button to enable a browser view. Not a big deal; it's just one small extra step. Is it something I should try to fix?

Andrew Paquin

Andrew Paquin

March 19, 2023

Nevermind. I figured it out. The default preview was on.