From the course: Creating Reports and Presentations with R Markdown and RStudio
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Code chunks and global code chunk settings - RStudio Tutorial
From the course: Creating Reports and Presentations with R Markdown and RStudio
Code chunks and global code chunk settings
- [Narrator] Of the many different components in R marked down document, "code chunks" are probably the most complex and where you'll spend most of your time writing. I've highlighted the two code chunks in the exercise files that we're going to look at in a minute or two. How do we know that we're looking at a code chunk exactly in an R marked down document? Well, they start and end with three backticks, and our studio colors them gray, so that we can easily tell them apart from the rest of our document where we're not writing R code. Code chunks have four components to them. The first is the "chunk language". This could be R, Ash, Python, SQL or some other language. For most R marked down users, the chunk language will be the R language, because that's what we are, we're people who write R code. After the chunk language, we can set a name for the code chunk. It's highly recommended that you always name your code chunks, so it's easier to troubleshoot the knitting process. After the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Installing R Markdown1m 41s
-
R Markdown, knitting, and generating outputs4m 13s
-
(Locked)
The YAML header of an .Rmd file3m 29s
-
(Locked)
Code chunks and global code chunk settings4m 8s
-
(Locked)
Writing and running R code in R Markdown files5m 45s
-
(Locked)
Splitting documents into sections or slides in R Markdown4m 21s
-
(Locked)
Tabbed sections in R Markdown HTML reports2m 22s
-
(Locked)
Formatting text in R Markdown files4m 5s
-
(Locked)
Bullets and lists in R Markdown2m 51s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-