ModernDive_book icon indicating copy to clipboard operation
ModernDive_book copied to clipboard

Add output in chunk chapter 5

Open JBSP-code opened this issue 4 years ago • 1 comments

It maybe a bit pedantic but to be more consistent from the perspective of a reader, since all other chunks in the book automatically produce the outputs, you could change the first chunk in this part:

https://github.com/moderndive/ModernDive_book/blob/e4a3313e5f383a02f89c86d19cf7241ff5f9512f/05-regression.Rmd#L805-L819

by setting the option {r, eval=TRUE, results='hide'} and adding the object name lifeExp_by_continent onto the last line

 lifeExp_by_continent <- gapminder2007 %>% 
   group_by(continent) %>% 
   summarize(median = median(lifeExp),  
             mean = mean(lifeExp))
 lifeExp_by_continent 

such that the reader automatically gets the corresponding output when copying and running the code in R while the second chunk handles the output for the book.

JBSP-code avatar Apr 12 '21 09:04 JBSP-code

Hey @theFippo thanks for the suggestions. We'll add this to our list of TODO's for v2

rudeboybert avatar Aug 09 '21 13:08 rudeboybert