r4ds-exercise-solutions | Exercise solutions to `` R for Data Science | Data Visualization library
kandi X-RAY | r4ds-exercise-solutions Summary
kandi X-RAY | r4ds-exercise-solutions Summary
Exercise solutions to "R for Data Science"
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of r4ds-exercise-solutions
r4ds-exercise-solutions Key Features
r4ds-exercise-solutions Examples and Code Snippets
Community Discussions
Trending Discussions on r4ds-exercise-solutions
QUESTION
I was recently reading a solution to an R4DS exercise. It includes the code:
...ANSWER
Answered 2021-Jun-04 at 19:52with the letters/LETTERS
, use
QUESTION
Started learning R recently using a GitHub open book. In question 5 under Exercise 3.3.1 of the open book, the question asked: "What does the stroke
aesthetic do? What shapes does it work with? (Hint: use ?geom_point
)"
I understand that the stroke
aesthetic works with shapes 21-24 since they have borders but I'm wondering why do the unofficial answer not mention it works with shapes 0-14 when you can change the colour of those borders too? There's no official answer & many have deemed this book accurate in answering the original open book's exercises, hence the term "unofficial answer". It is also not mentioned in cran.r-project.org too, under Shape's "Colour and fill" (nearing the end of the page).
Loaded tidyverse and the code I used for shape 5
...ANSWER
Answered 2019-Dec-14 at 19:28The stroke
argument is used to control the size of the edge/border of your point. If we say it differently it changes the size of the border for shapes like in the unofficial answer.
If you lock closely to https://ggplot2.tidyverse.org/articles/ggplot2-specs.html. You will notice that shapes 21 - 24 have both stroke
and fill
argument because they are fill with texture.
It is not the case for 0 - 14 shapes. The fill
arguments doesn't work for them. You can't change the inside color of the shape
, it is always white, see below. However the stroke
argument works because they have border and the size
argument works as well, but the inside is always white whatever fill
argument is given.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install r4ds-exercise-solutions
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page