{
  "title": "My first major PR as an @rstudio summer intern has been merged! #ggplot2 now has a new vignette on best practices for using it within an #rstats 📦. If you have an #rstats 📦 that uses ggplot give it a read and let me know what you think! https://t.co/mdGGAtPgEq",
  "date": "2019-06-05"
}

# #rstats

> **Dewey Dunnington** (@paleolimbot; 451/92): My first major PR as an @rstudio summer intern has been merged! #ggplot2 now has a new vignette on best practices for using it within an #rstats 📦. If you have an #rstats 📦 that uses ggplot give it a read and let me know what you think! https://t.co/mdGGAtPgEq  [&#8618;](https://twitter.com/xieyihui/status/1136006098178232321)

<!-- -->


> **Garrett Grolemund** (@StatGarrett; 390/124): Thank you @khailper for a #gganimate #rstats cheatsheet. Animate ggplot2 plots! Available at https://t.co/OZVUTm5lDl @rstudio https://t.co/9pmQy7VQ6J  [&#8618;](https://twitter.com/xieyihui/status/1135982445751349248)

<!-- -->


> **Mara Averick** (@dataandme; 365/89): Fab intro to one of the 🐐 ggplot2 extensions!
> 🌈 "gghighlight: Highlight ggplot2 w/ predicates" by @yutannihilat_en 
> https://t.co/x7N2ogvwSi #rstats #dataviz https://t.co/MYLRBMWlKS  [&#8618;](https://twitter.com/xieyihui/status/1135730146269437954)

<!-- -->


> **Claus Wilke** (@ClausWilke; 351/98): I prepared step-by-step instructions for reproducing a few of the figures from my book. #rstats #ggplot2 #dataviz
> https://t.co/fe7vO3wwAN https://t.co/G5Lk4K91gU  [&#8618;](https://twitter.com/xieyihui/status/1135959433941528577)

<!-- -->


> **David Robinson** (@drob; 321/56): Just learned about a new feature in dplyr 0.8.0: you can pass a name = argument to count() if you don't want it to be n
> >
> No more count() %&gt;% rename()! 🥳
> >
> #rstats https://t.co/il7yIRX5Bw  [&#8618;](https://twitter.com/xieyihui/status/1136003871191552000)

<!-- -->


> **Steen Harsted** (@SteenHarsted; 242/59): Please check out the very early version of mocapr. An R-package to animate motion capture data. 
> https://t.co/R52zU4be05 
> Feedback is most welcome. 
> @thomasp85 @SDUIOB  #rstats https://t.co/QZHnFDqspC  [&#8618;](https://twitter.com/xieyihui/status/1135980425422266371)

<!-- -->


> **Kirk Borne** (@KirkDBorne; 214/94): One of my all-time favorites &gt;&gt; The Most Complete List of the Best Cheat Sheets for #DataScientists covering #AI #NeuralNetworks #MachineLearning #DeepLearning #BigData #DataScience #DataViz #Python #Rstats #Coding etc.
> ——
> 👇👇
> https://t.co/r8WpZ0NDgS https://t.co/F0yoDTTwo2  [&#8618;](https://twitter.com/xieyihui/status/1135871690041438208)

<!-- -->


> **Sharla Gelfand** (@sharlagelfand; 185/40): today my work released our annual report on Ontario's nursing registration exams and i'll let you in on a little secret: it was completely built using #rstats. begin thread!
> >
> 📰: https://t.co/mT4JrF2KnF  [&#8618;](https://twitter.com/xieyihui/status/1135962094938009601)

<!-- -->


> **R-bloggers** (@Rbloggers; 176/60): Become a Bayesian master with bayestestR (0.2)  {https://t.co/FXhD31Qbth} #rstats #DataScience  [&#8618;](https://twitter.com/xieyihui/status/1135568249393995778)

<!-- -->


# blogdown

> **Alison Hill** (@apreshill; 188/40): Slides from my #SDSS2019 talk on teaching #blogdown...
> >
> https://t.co/h5ynKyqwFv
> >
> 3 🔑 points:
> >
> ⏱️ Leave 60-90 mins to cover
> 🚀 Minimize time-to-deploy (you can get a share-able link in 15-20 min using @Netlify Drop: https://t.co/ouSTFvHuu2)
> 🖼️ Pick a good theme (I have 3 faves) https://t.co/7w93Tcp9Wx  [&#8618;](https://twitter.com/xieyihui/status/1134332393999876096)

<!-- -->


> **Alison Hill** (@apreshill; 62/4): Heading out to @SDSSconf in Bellevue, WA- excited to share my experiences and lessons learned from teaching #rstats #blogdown in the classroom 🙇🏾‍♀️ Thursday @ 4pm (+ @rudeboybert!)
> >
> https://t.co/ynyJAElZaM
> >
> (link to slides not active yet- which are OF COURSE totally done 🤣) https://t.co/h0R5q7hOrn  [&#8618;](https://twitter.com/xieyihui/status/1133767610862981120)

<!-- -->


> **Mara Averick** (@dataandme; 38/7): 🤯 Woah! @jdatap has "Academic theme" night mode!
> 🌓 "Posts | John (JP) Coene" 
> https://t.co/1olKfr28Zq #blogdown #hugo https://t.co/ggcVd1NWOf  [&#8618;](https://twitter.com/xieyihui/status/1135586461988872194)

<!-- -->


> **We are R-Ladies** (@WeAreRLadies; 33/2): What did I do so far using #R? 
> I created my own website with ao a list of my publications (Hugo, blogdown/Rmarkdown): 
> https://t.co/SL68GPYSHq
> >
> I saw it on twitter and thought: oh my, that's way to hard, but it really wasn't! If I can do it, you...well, you know what I mean! 👍  [&#8618;](https://twitter.com/xieyihui/status/1135510959395676161)

<!-- -->


> **R-Ladies Berlin** (@RLadiesBerlin; 9/2): Instead of writing your blog alone at home, come and join us at today's meetup which covers blogdown 💯
> >
> https://t.co/Opv5D648lS  [&#8618;](https://twitter.com/xieyihui/status/1133747470763216898)

<!-- -->


> **Alison Hill** (@apreshill; 7/0): Also featuring some of my favorite #blogdown sites by @ProQuesAsker, @rudeboybert, and @statsgen 🥰😍  [&#8618;](https://twitter.com/xieyihui/status/1134333499475877889)

<!-- -->


> **Noam Ross** (@noamross; 6/2): Free idea (meaning, someone plz do this):
> ---
> authors: `r pkg::rnd("Author A", "Author B", ...)`
> ---
> But as an htmlwidget so it's different each time you reload the page. Bonus for blogdown compatibility. #rstats https://t.co/HvgA3OtDeZ  [&#8618;](https://twitter.com/xieyihui/status/1133806001327677440)

<!-- -->


> **Jozef Hajnala** (@jozefhajnala; 3/0): A bit ago I wrote about how to port and redirect a blogdown (or any #gohugo) website to a custom domain (https://t.co/W6QJQUPNZT) and suggested how to do it easier. 
> >
> After actually doing it (for a subdomain), I must say @Netlify is amazingly convenient, 301 redirects included. https://t.co/gdpQHXBayl  [&#8618;](https://twitter.com/xieyihui/status/1135934276552278017)

<!-- -->


> **Jozef Hajnala** (@jozefhajnala; 1/1): Also, it has a website, where you can see all the posted 📈 interactively, such as: https://t.co/tacT0k5DJv. Made entirely with #rstats as well, thanks the amazing #blogdown package (and @GoHugoIO).  [&#8618;](https://twitter.com/xieyihui/status/1134128245564235776)

<!-- -->


> **Benjamin Gravesteijn** (@BGravesteijn; 1/1): @eKrijkamp Thanks! I made it with #rstats: blogdown!  [&#8618;](https://twitter.com/xieyihui/status/1135868542195294213)

<!-- -->


> **boB 🇷udis** (@hrbrmstr; 1/0): @KenButler12 @noamross If {blogdown} then https://t.co/TAN1gfTYAG  shld be where you remove your shortname https://t.co/Ps1jhXPB9P  [&#8618;](https://twitter.com/xieyihui/status/1135966945470271489)

<!-- -->


> **Eric R. Scott** (@LeafyEricScott; 1/0): Boy, @xieyihui isn't kidding when he says not to update Hugo or your theme unless you really really need to. Just broke my #blogdown website pretty bad and had to load backups and downgrade. Gonna need a BIG chunk of time if I want to do this right.  [&#8618;](https://twitter.com/xieyihui/status/1135948080203702273)

<!-- -->


> **alex hayes** (@alexpghayes; 1/0): @gvwilson @hrbrmstr @noamross I've heard this but have no idea how to integrate with blogdown. @apreshill have you seen any examples of making this go?  [&#8618;](https://twitter.com/xieyihui/status/1135926251875647488)

<!-- -->


> **ヴィンティー@T/T** (@vin_tea01; 1/0): blogdownで開発するメリット
> ・RStudioで開発できる←個人的に最高
> ・ブログ用途なら静的サイトで十分というか金銭的にも速度的にもこっちのがよさそう
> ・GitHubでチームで共同開発可能(はてブロとかに対する優位性)  [&#8618;](https://twitter.com/xieyihui/status/1134130540074766336)

<!-- -->


# bookdown

> **Sharla Gelfand** (@sharlagelfand; 90/2): the 🔥 entire thing 🔥 is built, end-to-end, into an R package that uses the tidyverse, usethis, bookdown, and kableExtra. https://t.co/B4gwGLPjGQ  [&#8618;](https://twitter.com/xieyihui/status/1135962100692606976)

<!-- -->


> **Mike Love** (@mikelove; 63/18): Some similar sets of notes &amp; books we recommended to our class:
> >
> Hao Wu: https://t.co/I0zhMIy6d5
> Ryan Tibshirani: https://t.co/gCX4pQTF3w
> @rdpeng: https://t.co/SwDg9XABzn
> @csgillespie &amp; @robinlovelace: https://t.co/8q8k2p0nL8
> @hadleywickham: https://t.co/oX6G7hgXOZ  [&#8618;](https://twitter.com/xieyihui/status/1135526890385494016)

<!-- -->


> **Sharla Gelfand** (@sharlagelfand; 18/0): it's all bookdown and kableExtra with a little (but not too much!) LaTeX spice to make things look just so. tables like this are automated 😎 (and up to 8 pages long!) https://t.co/WKlTTc121J  [&#8618;](https://twitter.com/xieyihui/status/1135962104996028416)

<!-- -->


> **Statisticians and Data Scientists** (@statsanddatasci; 14/8): 📚💻Libros en linea totalmente gratuitos👇
> https://t.co/7f3ZtSRQcD
> >
> #DataScience #statistics #dataanalysis #stats #maths #rstats #rstatses #bookdown #rstudio #machinelearning #deeplearning #estadistica #cienciadedatos #analisisdedatos #DataViz #RMarkdown #TextMining #statistician https://t.co/kMxy0Pqz6a  [&#8618;](https://twitter.com/xieyihui/status/1135334844605640704)

<!-- -->


> **Christina** (@canoodleson; 12/2): Alicia Johnson’s presentation on bookdown is so cool and modern 😎#SDSS2019 https://t.co/nwZTLO0NAr  [&#8618;](https://twitter.com/xieyihui/status/1134236612752097280)

<!-- -->


> **Charles T. Gray** (@cantabile; 10/1): TIL bookdown:: does math environments.
> >
> https://t.co/p6GpK5YG8x https://t.co/efYESeJLdX  [&#8618;](https://twitter.com/xieyihui/status/1134947480125132800)

<!-- -->


> **Yihui Xie** (@xieyihui; 9/2): @contefranz @rstudio This is not impossible but not trivial to implement. I'd suggest you preview HTML output instead of LaTeX/PDF using xaringan::inf_mr() as you develop the document: https://t.co/ES6sTcx2T5 This way, the scroll position will be preserved when the output is (automatically) refreshed  [&#8618;](https://twitter.com/xieyihui/status/1133762309896249350)

<!-- -->


> **Steve Haroz 📊👁️🧠** (@sharoz; 7/0): @LacePadilla @mjskay This might be a good start https://t.co/eSkFvIvvKz  [&#8618;](https://twitter.com/xieyihui/status/1135321994449301504)

<!-- -->


> **Miles Ott 🏳️‍🌈** (@Miles_Ott; 6/0): @ScotinaStats @StatsbyLopez @MineDogucu @Macalester @CRC_MathStats We are writing the book in #Bookdown, and it will have a print version for purchase and a free and open source online version  [&#8618;](https://twitter.com/xieyihui/status/1135275200042459137)

<!-- -->


> **Keep It Surly** (@surlyurbanist; 6/0): Experimenting with bookdown for final formatting of the dissertation and, man, this is one of the few things from the RStudio folks I just don’t think is well explained at all  [&#8618;](https://twitter.com/xieyihui/status/1134157972056096768)

<!-- -->


> **Dr. GP Pulipaka** (@gp_pulipaka; 5/20): Authoring Books and Technical Documents with R Markdown. #BigData #Analytics #DataScience #AI #MachineLearning #IoT #IIoT #PyTorch #Python #RStats #TensorFlow #Java #JavaScript #ReactJS #GoLang #CloudComputing #Serverless #DataScientist #Linux #Books 
> https://t.co/PDt1Zz6MYj https://t.co/cRIEQPjNc2  [&#8618;](https://twitter.com/xieyihui/status/1134465958037270529)

<!-- -->


> **Omni Analytics Group** (@OmniAnalytics; 4/6): We missed the chance to hang out with our #rstats colleagues at the #SDSS2019 #datascience conference that wrapped up Saturday. To make ourselves feel better, we compiled some of the highlights into a #bookdown #tweetbook. Have a look!
> >
> https://t.co/czrGRoVKi1 https://t.co/db2KNZZoiQ  [&#8618;](https://twitter.com/xieyihui/status/1135681173093593088)

<!-- -->


> **Charles T. Gray** (@cantabile; 4/1): TIL bookdown:: has a sepia option. 
> >
> Really makes the draft motivational pictures at the start of every chapter in my thesis pop.  🥐 https://t.co/ypaob1Iwoa  [&#8618;](https://twitter.com/xieyihui/status/1134167923885371392)

<!-- -->


> **Hannah Blackburn** (@hannah_h_b; 4/0): @DinaPomeranz Principles of Econometrics with R (https://t.co/zNzmGLrQ81) by Constantin Colonescu (2016) #R4Econ  [&#8618;](https://twitter.com/xieyihui/status/1135977096272990208)

<!-- -->


> **Frans van Dunné** (@fransvandunne; 2/2): Por cierto, la presentación y con todos los vinculos esta aqui:
> >
> https://t.co/bV5b5J9UaH
> >
> (puedes ir a la pagina siguiente usando la barra de espacio en tu teclado)  [&#8618;](https://twitter.com/xieyihui/status/1134280618186104833)

<!-- -->


> **Eric Green** (@ericpgreen; 2/1): If you have experience creating or modifying #bookdown or #learnr templates please consider taking my (institution's) money. I'm looking for help customizing templates for an open access course. #rstats 
> >
> https://t.co/3YM40ZuBSs
> >
> (live shot of me trying to fix these templates) https://t.co/fja68z3tn2  [&#8618;](https://twitter.com/xieyihui/status/1135579770807365638)

<!-- -->


> **Fabian Dablander** (@fdabl; 2/1): Does anybody know how to get Stan syntax highlighting to work with rmarkdown? Simply doing
> >
> \`\`\`{stan}
> \`\`\`
> >
> as described here (https://t.co/ll4y0jotwx) does not seem to work.  [&#8618;](https://twitter.com/xieyihui/status/1133764985887363072)

<!-- -->


> **Bahareh Heravi** (@Bahareh360; 2/0): New book: Statistical Rethinking with brms, ggplot2, and the tidyverse https://t.co/HxEERF212S  [&#8618;](https://twitter.com/xieyihui/status/1135447397277032448)

<!-- -->


> **David John Baker, PhD** (@DavidJohnBaker; 1/1): Can someone point me to a #LaTeX / #rstats #Bookdown person that would be willing to help me with a few formatting questions? I have some requests from the grad school for my #phd thesis that will make it look worse, but have to do to get it uploaded. I'd happily pay for time.  [&#8618;](https://twitter.com/xieyihui/status/1135554868687585280)

<!-- -->


> **Jonathan Regenstein** (@jkregenstein; 1/1): @JoannaMelon I'm trying to use data.tree in bookdown and having some issues. any recommendation for a flowchart/decision tree visualization package? thanks! #rstats  [&#8618;](https://twitter.com/xieyihui/status/1133818214750851074)

<!-- -->


> **Jessica Streeter** (@phillynerd; 1/0): @sharlagelfand This is AMAZING 🙌 But the real question is how did you do the fancy cover page? Haven't figured it out in markdown, now wondering if it's a feature of bookdown?  [&#8618;](https://twitter.com/xieyihui/status/1136065314268094465)

<!-- -->


> **Nayef Ahmad** (@NayefAhmad4; 1/0): @sharlagelfand This is amazing! How hard is it to get bookdown to deal well with splitting tables across PDF pages, and moving figures around sensibly?  [&#8618;](https://twitter.com/xieyihui/status/1136017172587618304)

<!-- -->


> **Stas Kolenikov** (@StatStas; 1/0): @dataandme @_inundata @gdequeiroz #bookdown this  [&#8618;](https://twitter.com/xieyihui/status/1134616226053799936)

<!-- -->


# knitr

> **Jo Etzel** (@JosetAEtzel; 28/5): Just about ready for my "knitr for neuroimagers" #OHBM2019 #OSR lightning talk next week: a quick pitch for #rstats, #knitr, and dynamic report generation in general. https://t.co/W5i2I5imCT  [&#8618;](https://twitter.com/xieyihui/status/1135561744758255622)

<!-- -->


> **Simon Schwab** (@SimonSchw4b; 8/2): Important meta-analysis on response to antipsychotics using R and knitr with code and data available on OSF. Excellent work &amp; congrats! https://t.co/4xumuIOD3d  [&#8618;](https://twitter.com/xieyihui/status/1135789575144714242)

<!-- -->


> **Benjamin Wolfe** (@BenjaminWolfe; 4/2): 1/ #rstats #tipoftheday
> >
> Using #knitr chunk options you can set HTML classes in really fine-grained ways:
> >
> \`\`\`{r my_code,
> class.source=".foo",
> class.output=".bar",
> class.message=".hello",
> class.warning=".world",
> class.error=".oops"}
> # code
> \`\`\`
> >
> You can use those classes in CSS.  [&#8618;](https://twitter.com/xieyihui/status/1136076747433304064)

<!-- -->


> **Rodrigo Miranda** (@peregrinrm; 4/1): @lmonasterio Criei um exemplo no RStudioCloud: https://t.co/iFQ5Tc5LLO
> No RStudio 1.2 ao criar um doc rmarkdown ele instala as bibliotecas e pede para escolher um template. Escolhe o Presentation/PDF(Beamer). Gera o PDF rodando o knitr. Espero ter ajudado.  [&#8618;](https://twitter.com/xieyihui/status/1134436523661844480)

<!-- -->


> **Benjamin Wolfe** (@BenjaminWolfe; 1/2): 2/2 #rstats question, piggy-backing on that.
> >
> class.output sets the class of #knitr text output.
> >
> I haven't seen an option to set the class for a plot or other image output. (also haven't seen it for "as-is" HTML tables, but I get that.)
> >
> does it exist? @xieyihui maybe?  [&#8618;](https://twitter.com/xieyihui/status/1136076748481794049)

<!-- -->


> **Taylor** (@Taylor50041702; 1/2): It’s good to be teaching linear models this summer. Shaking off some rust and learning more about making slides w/ #rmarkdown and #knitr https://t.co/1tWK72gybt (in progress) #rstats  [&#8618;](https://twitter.com/xieyihui/status/1133753250036047872)

<!-- -->


> **Jo Etzel** (@JosetAEtzel; 1/0): @derek__beaton Some neat examples; I've made very complex knitr documents, but never attempted citations!  [&#8618;](https://twitter.com/xieyihui/status/1135670373733806080)

<!-- -->


> **Hao Ye** (@Hao_and_Y; 1/0): @rasmus1610 @TexanDhillon @rstatstweet IIRC, getting tables in Rmarkdown output using knitr::kable (or other packages) works pretty well, but getting a MS Word output that is a MS Word table is a known pain. (not sure if there's a good way to do that)  [&#8618;](https://twitter.com/xieyihui/status/1135286763574796289)

<!-- -->


> **Gjalt-Jorn Peters** (@matherion; 1/0): @djnavarro @rubenarslan So basically you just put everything in an .Rmd file without the YAML, and then pass that through knitr in a function where you make sure that whatever it needs in terms of objects with 'content' is available.
> >
> Ok, maybe it *is* getting too late, sorry 🙂  [&#8618;](https://twitter.com/xieyihui/status/1134577072305836032)

<!-- -->


> **Matt Crump** (@MattCrump_; 1/0): 1) code might run in the editor because the necessary bits are already loaded into the current global environment...However, the global environment is not used by knitr, because it loads a new R session, and creates a different global environment  [&#8618;](https://twitter.com/xieyihui/status/1134430767667396609)

<!-- -->


> **Matt Crump** (@MattCrump_; 1/0): Set global options for how all code chunks are rendered
> >
> \`\`\`{r setup, include=FALSE}
> knitr::opts_chunk$set(echo = TRUE, eval=TRUE, message = FALSE, warning = FALSE)
> \`\`\`  [&#8618;](https://twitter.com/xieyihui/status/1134430763988992000)

<!-- -->


> **Matt Crump** (@MattCrump_; 1/0): Oh no...I was writing just fine, everything was ok, and then I made a table with knitr::kable()...no table was made. Argh. this will not do. must have nice tables.  [&#8618;](https://twitter.com/xieyihui/status/1133844332086214661)

<!-- -->


> **CSS OSS** (@oss_css; 0/1): markdownposter - first cut at using markdown, knitr, pandoc, wkhtmltopdf, and css to create... https://t.co/RhgKfaeKlt  [&#8618;](https://twitter.com/xieyihui/status/1135222750484795392)

<!-- -->


> **David Reinstein** (@daaronr; 0/1): @dorotheafrenkel With #Rstats (Rmd #knitr sweave etc)  you can do this as part of a dynamic document where the text and code are in the same file. But even with #Stata you can have the results output to a particular folder and  reference that in your #latex code ("include" "include_graphics" etc  [&#8618;](https://twitter.com/xieyihui/status/1134071879654957057)

<!-- -->


# xaringan

> **Miles Ott 🏳️‍🌈** (@Miles_Ott; 5/0): Thanks to @BaumerBen and @AmeliaMN for helping me with my first xaringan slides!
> >
> Thanks to my colleagues and students at @SmithCollegeSDS for always being willing to chat data ethics!  [&#8618;](https://twitter.com/xieyihui/status/1134627280523649024)

<!-- -->


> **RSE@Sheffield** (@RSE_Sheffield; 2/5): Tonight at @Sheffield_R_: 1) @richyyl on webscraping in #rstats (a short walk through #rvest, #selenium and #purrr) and 2) @annakrystalli on presentations in R (using the #Xaringan package)!  https://t.co/hxYL9pUeAx  [&#8618;](https://twitter.com/xieyihui/status/1135907195353063427)

<!-- -->


> **Will Chase** (@W_R_Chase; 2/0): @mitchhendo_ Actually I made them in R with the xaringan package  [&#8618;](https://twitter.com/xieyihui/status/1134814344166948864)

<!-- -->


> **Nicolas Roelandt** (@RoelandtN42; 1/0): @jasongrahn @AmeliaMN @kwbroman I guess, from the Yolo feature of {xaringan} ? 😁
> >
> https://t.co/xnzcrlR3Ft  [&#8618;](https://twitter.com/xieyihui/status/1135566426356555776)

<!-- -->


> **Jens von Bergmann** (@vb_jens; 1/0): @stephen_tapp xaringan! That’s all I use these days. Renders markdown with R code, as well as latex. Lives as a webpage so easily shareable and accessible. And has a cool presentation mode.  [&#8618;](https://twitter.com/xieyihui/status/1135338134948892672)

<!-- -->


