YAML
This lesson is called YAML, part of the R in 3 Months (Fall 2021) course. This lesson is called YAML, part of the R in 3 Months (Fall 2021) 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:
Go into the YAML and change the title to “My Super Fancy Report.”
Remove the line with the date from the YAML.
Change the output format to HTML by changing
output: word_document
tooutput: html_document
.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!
Course Content
134 Lessons
You need to be signed-in to comment on this post. Login.
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
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?
Sam Bird • March 24, 2022
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,
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?