Text
This lesson is called Text, part of the Fundamentals of R course. This lesson is called Text, part of the Fundamentals of R 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
Working in your
report.qmd
file, delete the default content (everything below the YAML).Add a first-level Heading that says "Introduction"
Add this text below the Introduction first-level heading (note the bold and italics):
This report is about three species of penguins
Adele
Gentoo
Chinstrap
You'll learn so much about the penguins. I hope you're ready!
Finally, render your report again and make sure you see the changes.
Have any questions? Put them below and we will help you out!
Course Content
34 Lessons
1
The Grammar of Graphics
04:39
2
Scatterplots
03:46
3
Histograms
05:47
4
Bar Charts
06:37
5
Setting color and fill Aesthetic Properties
02:39
6
Setting color and fill Scales
05:40
7
Setting x and y Scales
03:09
8
Adding Text to Plots
07:32
9
Plot Labels
03:57
10
Themes
02:19
11
Facets
03:12
12
Save Plots
02:57
13
Bring it All Together (Data Visualization)
06:42
You need to be signed-in to comment on this post. Login.
Jessica France • September 29, 2023
Hi! I tried doing the 1. to get the ordered list, but it just isn't working. Kindly find my code below:
title: "My Penguins Report" author: "Jessica France" format: html
Introduction
“ This report is about three species of penguins
1.‘Adele’ 1.‘Gentoo’ 1.‘Chinstrap’
You’ll learn so much about penguins. I hope you’re ready!”
Gracielle Higino Coach • September 29, 2023
Hi Jessica! A common thing that happens that messes up with formatting is the lack of spaces between elements or between paragraphs. In your case, it seems like there's a space missing between the
1.
and the words after. Try adding a space there and let us know if it works!Valliappan Muthu • May 22, 2024
Hello I am facing similar problem , both with and without space the numbering and bullet list is not working:
Input You can use bullet or numbers
or 1.list 2.list
The output was:
You can use bullet or numbers 1. Number 5 2. Number 6
or 1.list 2.list
David Keyes Founder • May 22, 2024
Make sure to put a space after the period. Let me know if that helps!
Valliappan Muthu • May 23, 2024
Hi, I did that and keep getting a similar output "Introduction A document on penguins for training
Reporting on three penguin species 1. Adelie 1. Gentoo 1. Chinstrap"
Has it got something to do with any settings of rmarkdown?
David Keyes Founder • May 23, 2024
It shouldn't have anything to do with settings. Could you please post your markdown text here? Please make sure to add three backticks before and after it in order to make it formatted correctly on the website.
Valliappan Muthu • May 23, 2024
David Keyes Founder • May 23, 2024
Ah, I see the issue! You need to add a line break after the "Reporting on ..." line. Like this:
Generally speaking, you want to add line breaks before and after each item. Hope that fixes it for you!
Valliappan Muthu • May 23, 2024
Great! thanks it worked.
Another bothering issue I have been trouble seeing my figures seen in the viewer pane - what should be done for this??
Valliappan Muthu • May 23, 2024
SOrted these both..Thanks David
Libby Heeren Coach • May 23, 2024
Glad it's sorted out! What ended up being the problem with your plots not displaying in the Plots pane?
Valliappan Muthu • May 23, 2024
Hi,
I have been storing them as objects directly and plots were not seen on the viewer pane if stored as objects
Brian Slattery • October 3, 2023
I'm guessing this is something we might talk about later, but how do we change the default formatting (e.g. changing the font, having the headers red instead of blue, etc). I was guessing that this would be in a different part of the process because the source and rendering are being split up (like HTML vs CSS) but I was having a hard time figuring this out via Google. It seems like for HTML output you would literally have a CSS file as well? Is there an equivalent for Word, PDF, or other formats?
Gracielle Higino Coach • October 3, 2023
Hi Brian! This is a great question and the short answer is YES! We are going to learn more about it in the last few weeks of the course, and we also need "style files" to be used as templates for our documents. For HTML this means a CSS file, for PDF you can use a LaTeX, and for Word, you can use another Word document.
Some things can be done using HTML notation for HTML outputs, but that's rarely used because that's the opposite of what we want with reproducible reports, right? We want to change the content, not the format.
We can chat about it in a co-working session!
Gayathri Mahendran • January 21, 2024
Hello, I can't preview my reports in the viewer pane. I have set the options to 'Preview in Viewer Pane'. Is there something else that I should change? Every time I render I can't see a thing in my Viewer pane, but the output file opens up immediately.
David Keyes Founder • January 21, 2024
What format are you trying to render to?
Gayathri Mahendran • January 22, 2024
Hi David, Thank you for your response. I was looking look render to HTML format. It didn't seem to show up in the viewer pane. Later, I closed and restarted my R session and then it did work.
David Keyes Founder • January 23, 2024
Glad it worked!
Valliappan Muthu • April 3, 2024
Hi David, Unable to view the html in the preview pane, even after restarting the session. Please guide!
Libby Heeren Coach • April 3, 2024
Hey, Valli! In RStudio, at the top of your source pane (where your .qmd file is open), there is a small gear icon with a down-arrow next to it. If you click that, you'll see an option for "Preview in Viewer Pane" there. Try selecting that and seeing if your subsequent HTML output is rendered in the viewer pane.
Valliappan Muthu • April 3, 2024
It worked! Thanks
Leo Gutknecht-Gmeiner • April 2, 2024
I have the same problem as someone from the last course: My reports do not show in the viewer pane, but open up separately. How can I change this?
Libby Heeren Coach • April 3, 2024
Hi, Leo! In RStudio, at the top of your source pane (where your .qmd file is open), there is a small gear icon with a down-arrow next to it. If you click that, you'll see an option for "Preview in Viewer Pane" there. Try selecting that and seeing if your subsequent HTML output is rendered in the viewer pane. And for doing both bold and italic, you'll just combine the notation or add an extra set of asterisks:
Leo Gutknecht-Gmeiner • April 2, 2024
Another thing: what if I want a text in italics and bold?
Valliappan Muthu • April 3, 2024
I think it is bold and italics
Valliappan Muthu • April 3, 2024
*** words***
Gabby Bachhuber • April 3, 2024
My RStudio is actually formatting everything for me! It starts as a header; I didn't even need to use "#". When I typed "1." and hit enter, the next line showed as "2." The only thing I did need to do was the bold and italics. Is that a new feature of RStudio (mine is 4.3.2)?
Libby Heeren Coach • April 3, 2024
Hey, Gabby! It sounds like you might be in the visual editor! At the top of your source pane, there will be two buttons that say Source and Visual to switch between the two. If you click Source, it should change back to being pure unstyled code.
Valliappan Muthu • May 29, 2024
Hello, I tried to create the following using quarto
But when I do that, I get:
My code was
David Keyes Founder • May 30, 2024
Try adding line breaks before and after each line. That should fix it.