NEW POST: Reorder categories when facetting with ggplot2 #rstats



Julia Silge (@juliasilge; 882187): NEW POST: Reorder categories when facetting with ggplot2 #rstats >

Kirk Borne (@KirkDBorne; 335161): One of my all-time favorites >> The Most Complete List of the Best Cheat Sheets for #DataScientists covering #AI #NeuralNetworks #MachineLearning #DeepLearning #BigData #DataScience #DataViz #Python #Rstats #Coding etc. —————— 👇👇

RStudio (@rstudio; 294111): Tour through the #tidyverse, Part 1 of many The tidyverse is an opinionated collection of R packages designed for data science. All packages share an underlying philosophy and common APIs. > #rstats #DataScience

Gina Reynolds (@EvaMaeRey; 22554): A minimal Galton Board build \w #rstats #gganimate #tidyr #dplyr! Step-by-step presentation in #xaringan + reveal functions. 😊😊😊

RStudio (@rstudio; 19660): forcats - Helper for reordering factor levels (including moving specified levels to front, ordering by first appearance, reversing, & randomly shuffling), & tools for modifying factor levels. Cheatsheet > Tour the #tidyverse #rstats

Kelly Bodwin (@KellyBodwin; 19315): > stay up all night reading/writing about tidy eval > drive to work > this is, zero edits, what the sky looks like > Either I have finally lost my last marble, or the Universe is an #rstats user.

Eiko Fried (@EikoFried; 18044): Thanks @alistair604 for pointing me towards ggdag, an incredibly powerful tool to visualize graphs in #rstats. > Just look at this: So little code, so much amaze!! @lindanab1 @SachaEpskamp @MaartenvSmeden >

Nick HK (@nickchk; 17249): Hey! I’ve got a new 📦#rstats package📦, called “Panel Maneuvers in dplyr” or pmdplyr, install with devtools::install_github(‘NickCH-K/pmdplyr’) > pmdplyr is a set of tools for the cleaning, preparation, and manipulation of panel and hierarchical data. Description follows…


Alison Hill (@apreshill; 314): 🥳 #blogdown news- thanks to @xieyihui, the dev version now searches for the minimum Hugo version required by your @GoHugoIO theme, + automatically updates if needed when you run blogdown::new_site() > 👉🏾 remotes::install_github(‘rstudio/blogdown’) >

Alison Hill (@apreshill; 234): The beauty of #blogdown + @github + @Netlify, from @Mayacelium > @rstudio interns living their best data science lives 🏝️🤣😂 > (see training materials here:

Ariel Muldoon (@aosmith16; 205): Ooo, just discovered #knitr all_labels() to extract all chunk names and chunk option ref.label to put previous chunk code in a new chunk. 🤯 Just what I needed to combine all code in a #blogdown post in one chunk at the end for easy copying. #rstats

Jeff Hollister (@jhollist; 172): Looking for some guidance on how to use an #rstats #blogdown site with non-technical users contributing to the site. I want to manage a site with blogdown, but have others with zero coding, github, etc. experience be able to contribute Anyone have experience with this/ideas?

Alison Hill (@apreshill; 161): @jhollist If no R code needs to be run, you can do blogdown/Hugo entirely with markdown files for all the content on GitHub- then hook it up to Netlify to build with every push. The nice thing is to have branch deploys and pull request deploy previews, and of course Hugo themes.

Sven De Maeyer (@svawa; 121): After some playing around in @rstudio Finally launched my new personal academic website with #blogdown. Curious? Check out on Time to share publications, talks and projects and write some blogs on analyses…

Sean Davis (@seandavis12; 91): FWIW, I added parallel building (build multiple Rmd pages simultaneously) to @xieyihui great blogdown package. Leverages #BiocParallel to use all cores. It works for me, but I make no guarantees….

alex hayes (@alexpghayes; 86): #rstats twitter: @karlrohe is looking for someone with blogdown experience to turn the Murmation Project ( from a proof of concept into a professional website! > we have grant money that is about to evaporate so please email me ASAP!

Artjom Shelya (@artjomshl; 83): Dear twitter, I’m considering to make a static website with some materials from my R + literature course and I need an advice. What would you suggest to use to go from Rmarkdown -> Web? blogdown + Hugo? Gitpages? Something else? #rstats #rmarkdown #blogdown

Regina Galambos (@mediasittich; 72): Day1 #100DaysOfCode 👩🏾‍💻 > Started practice project mini blog with @djangoproject on @MozDevNet Reviewed CRUD principles Learned how to set up a markdown blog in @rstudio with #blogdown 🤓😊 Log:

Pablo Herrera (@pherreraariza; 61): Finalmente ya tengo mi aplicación para descargar y ver el cierre del P48 cada día. Ahora tengo que acordarme cómo publicar un post con R y blogdown.

Mikkel M Andersen (@mikldk; 61): Symbolic math (and LaTeX output) in R #rstats with #Ryacas (based on #yacas) is getting a major update! Read about it at (new blog made with #blogdown). Please give your feedback!

Alison Hill (@apreshill; 60): @sharlagelfand @abtran I have also happily used this trick as well on my blogdown site:

Greg Wilson (@gvwilson; 50): addendum: blogdown + github + netlify + some pretty excellent training from @apreshill

Erika Jacobs (@ErikaTheOutlier; 43): I set up and themed a personal website using #blogdown in @rstudio, and wrote a streamlined tutorial with baby steps on how to do it! #rstats #rmarkdown

Joyce Cahoon (@joyceisms; 41): @apreshill @rushadFaridi @Mayacelium highly recommend alison’s series! made a shortened version for a @RLadiesRTP workshop tmr but all credits to alison, totally parroting your words here😂

Amelia Miramonti (@AmeliaMiramonti; 40): In case anyone else is trying this and has lots of little questions like me, here’s a great resource to complement @dsquintana’s helpful thread/blogpost: >

Joyce Cahoon (@joyceisms; 35): Thanks y’all for making it out tonight! The OG is @apreshill pls check out her awesome

Adam Sparks (@adamhsparks; 31): @djnavarro @MooresMt blogdown makes it rather easy when combined with the Hugo Academic theme, code: and page: It took me a while to set it up, but once it was, it’s easy to maintain. The CV is in LaTeX, code:

Alison Hill (@apreshill; 31): @fellgernon @AedinCulhane @Bioconductor @KevinRUE67 @georgecushen + if you want more R-specific hand-holding, some up-to-date resources are here: > Developed for an in-house summer internship workshop series at @rstudio, but materials may still be helpful

Owen Churches (@OwenChurches; 30): Next instalment in the amazingness of #blogdown is…you can run rvest::read_html() in a code chunk and the url is read when you serve_site(). It’s probably not a good idea but wow, I’m just amazed by this.

Jeff Leek (@jtleek; 30): @apreshill @NicholasStrayer @xieyihui @georgecushen I can’t seem to get the Academic theme to find images when using blogdown on I found this but can’t seem to find the right places to change urls in layouts? Help! :)

Jo(sephine) Lukito (@JosephineLukito; 30): @UWMadison @UWMadisonLS students: If you know R blogdown, this is a great way to make some summer money, and you’ll be working with awesome folks like @_fchen , @alwzysmilin , @karlrohe and me!

Arslan Zaidi (@A_A_Zaidi; 20): @GbuckTeo Try Hugo and/or R blogdown (which also uses Hugo under the hood)

Random Critical Analysis 🎲🤔🕵️ (@RCAFDM; 20): @phl43 @jonatanpallesen @Scientific_Bird @KirkegaardEmil @haywire98 I started working on a blogdown-site about a year ago, but ended up being a huge time suck b/c I wanted to customize it too much :)

Fabio Votta📊🦉 (@favstats; 20): Looking through the Google Analytics page of my #blogdown site & I was surprised to learn that my (very short) introduction to xaringan seems to be the most visited post. I don’t think it’s that great actually so I should probably update it/create one that goes into more detail

Sharla Gelfand (@sharlagelfand; 20): yes i fixed my blogdown no i can’t figure out how to use a single {{ instead of `{{ }} in text because {{ }} is hugo shortcodes so you have to close them (or at least i couldn’t figure out how to keep them open)

Alison Hill (@apreshill; 20): @fellgernon @AedinCulhane @Bioconductor @KevinRUE67 @georgecushen If you opt to use blogdown, be sure to install the development version of the package first before making your new site:

Zorro Notorious M. E. B. (@znmeb; 20): @jhollist @lovetheants BTW, I switched from Blogdown to Distill a few months ago. I’m at

🇲🇽 Dr. Leonardo Collado-Torres (@fellgernon; 20): @apreshill @AedinCulhane @Bioconductor @KevinRUE67 @georgecushen @rstudio Thanks @apreshill for all the info you shared last night! > @AedinCulhane and others: give hugo-academic and blogdown a try! If you have questions, you know how to find all of us hehe ^_^ :)

Aedin Culhane (@AedinCulhane; 20): @KevinRUE67 @apreshill @fellgernon @Bioconductor @georgecushen Thanks also for your script

Matt Moores (@MooresMt; 10): @djnavarro I don’t know of any easy way to go from blogdown to CV or vice-versa. I currently maintain these separately

PJ Ryan (@PJRyan89; 10): @artjomshl @rstats4ds I link to some resources for using Hugo/academic here: > It’s definitely worth checking out the thread @dsquintana wrote about blogdown

PJ Ryan (@PJRyan89; 10): @artjomshl @rstats4ds I use blogdown + Hugo + Netlify and I really like it

boB 🇷udis (@hrbrmstr; 10): @sharlagelfand hugo v0.55.6 gives me this on a hastily-crafted {blogdown} site

boB 🇷udis (@hrbrmstr; 10): @sharlagelfand ARGH did not mean to hit the enter key so fast. That post from 2018 explains it pretty well and IIRC works via {blogdown}

Taras Kaduk (@taraskaduk; 10): @apreshill @jhollist I second this. I stripped away the blogdown level and went bare HUGO. It’s a much simpler setup.

Alison Hill (@apreshill; 10): @HeidiSteiner16 haha I’ll update with answers! Did you do this: > > The answer is NEVER. Every time you “serve site”, public gets regenerated. No artisanal HTML editing allowed! Only ever edit the .toml, .md, .Rmd, or .Rmarkdown files :)

James Waters (@lovetheants; 10): @jhollist My site is through #rstats #blogdown, but I haven’t been able to successfully learn github well enough to host it there

Marianna Foos (@MariannaFoos; 10): @jhollist I have wondered this myself on days when I can’t remember how to run my own blogdown site. I have thought about getting content via google suite (upload or forms, etc), or some sort of ITTT email solution, then publishing with a trigger or a cron job

alex hayes (@alexpghayes; 10): @matt_hanhat @karlrohe Will do! If you’re interested, can you shoot an email to with a link to a blogdown blog? It’s really helpful to see the blogdown source code as well!

Kévin Rue-Albrecht (@KevinRUE67; 10): @fellgernon @AedinCulhane @Bioconductor @georgecushen @apreshill Indeed I should clarify that I have not written that post (a leftover from the template website). That said, once set up, I wrote a script that builds and deploys my Blogdown website, so maintaining it is EXTREMELY easy with a single command! See

Craig Hamilton (@craigfots; 0/2): #rstats people: I’m looking for examples of interactive timeline visualisations (eg timevis) that can be used on blogdown sites (eg hugo::academic). Need to incorporate x categories of data and (hover) URLs on data points. Any examples/tutorials would be most welcome. #dataviz


Jen Wilkins (@JenWilkinsMango; 5315): I might be late to the party, but did not realise this was a thing till this morning. What an amazing learning resource for #rstats!

Robin Lovelace (@robinlovelace; 507): As the number of open source books out there continues to grow I’m wondering: which publishers allow a ‘hybrid model’, whereby books are published online and in print? Publishers on include: > - O’Reilly - CRC Press - OTexts - Princeton > Any others?

emre toros (@emretoros; 4813): Sosyal Bilimler Arastirmalari icin R Ücretsiz çevrimiçi kitabq buradan ulaşabilirsiniz

Debra Titone (@debra_titone; 3911): Just saw this R book, and it’s awesome.. >

tipsder (@tipsder; 137): ¡Ciencia de Datos Para Curiosos! Una forma diferente para entender qué es la ciencia de datos, para qué sirve y cómo podemos usarla. Y, lo mejor, con un enfoque desde el uso y aprendizaje de #R #rstats #DataScience #dataviz #Datavisualization #data

atusy (@Atsushi776; 95): bookdown::gitbook + Pandoc 2.7.3ユーザはGitHub版bookdown使ってね.

John T. Johnson 🧠 Luctor et Emergo (@John4tl; 91): @larsjuhljensen Time for a push to submit in Markdown (bookdown). Researchers focus on content, publishers on publishing. Checking and typesetting from Markdown can be fully automated. #AcademicTwitter #phdchat #markdown #bookdown

Statisticians and Data Scientists (@statsanddatasci; 510): 📚#CienciaDeDatos para curiosos - Martín Montané👇 > #Statistician #DataAnalyst #Statistics #Maths #Stats #Econometrics #DataAnalysis #Estadistico #Estadistica #Matematicas #Econometria #AnalisisDeDatos #Rstats #RstatsEs #DataScience #tidyverse #DataViz

Luca Zavarella (@lucazav; 53): Statistical advices and #rstats / #SPSS implementation about #missingdata #statistics #DataScience #livebook

atusy (@Atsushi776; 52): なんかpandoc2.7.3の仕様変更に巻き込まれた?! 明日確認する

David Clarance (@daveclarance; 52): #rstats are there ways to make #bookdown prettier than the default? Are there modules/templates out there? My google skills are failing me.

f0nzie@OilGainsAnalytics (@OilGains; 42): Another #bookdown ebook built with #rsuite. This time the turn for “Data Visualization” by @ClausWilke. #rsuite is not a replacement of #RStudio but rather a extraordinary complement by adding an extra layer on top of other #rstats projects and packages.

Charles Lanfear (@cclanfear; 40): @causalinf @grant_mcdermott @terrytsaiecon @hsantanna There are multiple methods for running Stata code inside R by calling out to the Stata process. Note sure how it’d translate to bookdown, but a recent one for RMarkdown is here:

Peter Meissner (@peterlovesdata; 31): Feature Engineering and Selection: A Practical Approach for Predictive Models

Statisticians and Data Scientists (@statsanddatasci; 31): 📚Pack YouR Code by Gaston Sanchez👇 > #Statistician #DataAnalyst #Statistics #Maths #Stats #Econometrics #DataAnalysis #Estadistico #Estadistica #Matematicas #Econometria #AnalisisDeDatos #DataMining #EBOOK #Rstudio #RCode #BookDown #Rstats

Ajay Koli (@koli_ajaykumar; 30): @amydjohn 4. Use #rstats #bookdown to save time on typesetting and produce a beautiful document. 5. If you have weak focus like me. An advice of 20 (work) + 5 (rest) minutes worked good for me. 6. Keep fit. I used jogging. > All the best - wonderful journey ahead.

しょこβ📚 (@anemptyarchive; 30): 手作り資料が100ページ越えてた…bookdownを使えば幸せになれたりするのだろうか??

atusy (@Atsushi776; 21): Pandoc 2.7.3 以降では bookdown::html_document2 で clean_highlight_tags: false しなくても行番号をつけられるようになった.しかし,fenced code attributes に numberLines クラスを足した時だけ追加で div.sourceCode とか pre.sourceCode とかの margin を変更しやがる.

LittleSquirrel (@noccaea; 20): Less than ten minutes to learn how to import citations from my Zotero to my bookdown document, with the citR package and get a beautifull bibliography 🥰 Thank you awesome developpers!!💙 #Rmarkdown #bookdown #AweromeR

Fabio Gaitan (@funesfabiog; 20): Otro libro de ciencias de datos.

¡OdioEstadística! (@OdioEstadistica; 13): Es de un científico de datos > Comparte con este “#” –> #Mundocondatos > #Statistics #Analisisdedatos #estadistica #DataAnalysis #DataScience #Rstats #rstatses #Cienciadedatos #MachineLearning #ApredizajeAutomático #Bookdown #rpubs

atusy (@Atsushi776; 11): Pandoc 2.7.3 を使うと bookdown におけるコードブロックの行番号がちょっと楽になりそう | Atusy’s blog

Katie Lee (@ResourcefulSqrl; 11): @adam42smith I use markdown or LaTex with pandoc or Rmarkdown/bookdown, but sometimes I have things that are shared with folks who only use Word, and converting back and forth is a PITA when there are edits. I was hoping I could point Zenodo to a .bib magically and have it act like a lookup?

Doctorb Zhian N. Kamvar (@ZKamvar; 10): @daveclarance I think it will take a bit of fiddling with css but the bookdown book points to the right direction:

Craig Hutton (@huttoncp; 10): Educational and entertaining #rstats

Robert Amezquita (@robamezquita; 10): @BrianCapaldo @stephaniehicks It’s on me - the GH button doesn’t seem to work on the bookdown! Some technical annoyances to figure out :)

¡OdioEstadística! (@OdioEstadistica; 0/1): Es de un científico de datos > Comparte con este “#” –> #Mundocondatos > #Statistics #Analisisdedatos #estadistica #DataAnalysis #DataScience #Rstats #rstatses #Cienciadedatos #MachineLearning #ApredizajeAutomático #Bookdown #rpubs

Dr Kristian Brock (@CatchTwentyToo; 0/1): “It is fine for humans to err (in computing), as long as the source code is readily available.” > Thanks to @xieyihui for this great book: >

Naras (@b_naras; 0/1): Toggle solution visibility in bookdown ( #rstats #bookdown


Ariel Muldoon (@aosmith16; 212): Here’s what I included in my .Rmd, excluding specific chunks by name: >

labs = knitr::all_labels()
labs = labs[!labs %in% c("setup", "toc", "getlabels", "allcode")]

{r allcode, ref.label = labs, eval = FALSE}

Code Geek (@codek_tv; 50): Ruby Algorithm Documentation with AsciiDoc and Knitr > #ruby #programming

Stephen D. O’Connell (@steveoconnell1; 50): As #Stata fans enter #Y2K with multiple dataframes in v16, I am finally claiming full conversion to #useR – a new project gave me the impetus to try out #knitR/#RMD/#ioslides for integrated analysis and dynamically updated slides, and I think I’ll never look back!

Jana Jarecki (@JanaJarecki; 40): @abmathewks @MattDowle I’m in, too. I’m pro with latex and good w knitr, too. Also good with graphics. > Do you want to Skype early this week? > Do we have a data.table cheat sheet, for instance?

Darren Clinch (@darrenclinch; 32): My first time submitting an assignment using knitr. Pretty cool #rstats package.

Web Development (@Web_Dv123; 22): Ruby Algorithm Documentation with AsciiDoc and Knitr > #ruby #programming

Thomas Mock 👨🏼‍💻 (@thomas_mock; 21): @phillynerd Have you tried knitr::spin? Could be how pure RMarkdown treats file paths. > > has some historical info. > Not sure if it’s still under development but also {{ezknitr}} -

Alison Hill (@apreshill; 21): @aosmith16 The knitr purl trick may also be useful to you:

Ariel Muldoon (@aosmith16; 20): @apreshill @ma_salmon @yihui Ha, this is exactly what I needed yesterday! My google-fu failed me. > I only found all_labels() because I was typing ?knitr:: and it popped up at the top of the autocomplete list. 🤣

Jack Bailey (@PoliSciJack; 20): @Jade_Pickering @AcademicChatter @EleanorHassan Knitr::kable can do this from within R if you pass it, e.g., the summary of a regression

jQuery (@jquery_dv; 10): Ruby Algorithm Documentation with AsciiDoc and Knitr > #ruby #programming

Web Development (@developmentwep; 10): Ruby Algorithm Documentation with AsciiDoc and Knitr > #ruby #programming

Alison Hill (@apreshill; 10): @aosmith16 That makes total sense- I often feel like most of my rmarkdown “tricks” are actually knitr tricks. Also I get what you googled- like I just want my code back!

Ariel Muldoon (@aosmith16; 10): @apreshill I see now my mistake was to focus on the task and not the outcome (“appendix”). So I was using terms along the lines of extracting or copying all code chunks. > I was also using rmarkdown as a term, and it seems like I should have been using knitr. They’re so intertwined!

Jack Bailey (@PoliSciJack; 10): @Jade_Pickering @AcademicChatter @EleanorHassan Yeah, it can be hard work! Bonus for using knitr or something similar: fully reproducible tables!

Forest Gregg (@forestgregg; 10): we might be coming back to R for knitr (and RMarkdown). > strangely, pandas might make this easier to do to. it’s so different from normal python that learning pandas seems about as difficult as learning R.

Elise Bell (@eabell_; 10): @jvcasill The solution appeared to be some arcane combination of a new session, a new document, and retyping all the code from the original! What’s bugging me now is that the inconsistent knitr result is now the rstudio result as well, and the original rstudio result has vanished.

Elise Bell (@eabell_; 10): Okay, assuming that I have already done all of the obvious things to fix the problem (because I have), what might be causing my RStudio console and knitr output to give different results?

Joseph Casillas (@jvcasill; 10): @eabell_ Hard to say without more details so I’ll ask the annoying/obvious question… did you restart the session in Rstudio? Knitr always starts from a fresh session.

Docker Fan (@DockerDv; 0/1): Ruby Algorithm Documentation with AsciiDoc and Knitr > #ruby #programming


Brent Thorne (@brentthorne18; 93): @CokoFoundation @WarrenManuel5 @davisjmcc @mikemorrison @prab4th @xieyihui @RLesur Also made a thesis document template which was just merged into the pagedown package in case any is interested in writing their thesis in R/RMarkdown >


Dr. Sam Tyner (@sctyner; 200): Omg I thought I was hitting Command+F in my Rmd but this happened to my #xaringan slides instead. 😱🙃

ilustat (@ilustat; 105): Slide presentation: “Introduction to R Markdown”. #rstats #rmarkdown #xaringan Enjoy! >

Fabio Votta📊🦉 (@favstats; 72): Some people asked me for the code of my xaringan slides. You can find them on my GitHub (with most of the rest of the stuff that I am up to): >

ilustat (@ilustat; 72): “Introduction to R Markdown” workshop GitHub repo. #rstats #rmarkdown #xaringan >

Yihui Xie (@xieyihui; 30): @EvaMaeRey @apreshill @benmarwick @espinielli It won’t work with xaringan. The technical difficulty aside, I’m not yet convinced that figures (or tables) need to be numbered and cross-referenced in slides. I’d keep slides as simple as possible. The audience won’t remember the specific numbers like Fig 3 on p7 or Tab 5 on p9.

Martin John Hadley (they/them) (@martinjhnhadley; 21): I’m choosing to believe RStudio deliberately keep the Shiny Server install link short enough to fit on a regularly sized {xaringan} slide

Beatriz Milz (@BeaMilz; 10): @tech_jessi Sobre R, a primeira foi la na USP (out/18) pra galera da pós em ciência ambiental e falei um pouco sobre o uso do R resolvendo um problema específico. E o primeiro em meetup (nov/18) foi sobre o pacote xaringan… algo q aprendi foi q eu aprendo MUITA coisa nova quando apresento

Garrick Aden-Buie (@grrrck; 10): @Dr_Joe_Roberts Cool idea! It’s not possible atm… but it could be 😉 where does the timer end up? In a webpage, xaringan slide, rstudio console, some other place…? Feel free to open an issue on github with more details about your use case if you want:

Gina Reynolds (@EvaMaeRey; 10): @xieyihui @apreshill @benmarwick @espinielli Thanks so much for the info, Yihui! Also for your (as usual) thoughtful perspective. I think what you are saying is right about the presentation context. My interest is using case is for using Xaringan more like an online book, so audience has more freedom.

Tam (@tam07pb915; 10): Xaringanだとわかったので変なおっさん挟まってるかなと思ったけど最後まで出てこなかったw

Diego Trindade (@diegopftrindade; 10): @_ColinFay My 4 yr old loves #xaringan. She can type and see what is going on. Currently she is wondering how to draw unicorns in the slides. New unicorns xaringan theme coming soon, haha.

Alison Hill (@apreshill; 52): @aosmith16 @ma_salmon Nice! This seems like a common thing people want to do- @yihui has a blog post awhile back summarizing some different approaches:

Tim Riffe (@timriffe1; 30): @nikkilsud @dataandme @nickchk Here are a bunch:

R Weekly Live (@rweekly_live; 21): On TIOBE Index @xieyihui #rstats #datascience

Yohan J. Rodríguez (@hasdid; 11): #R #Automated | On TIOBE Index

Dⓐniel Chen (@chendaniely; 10): @ocefpaf require only returns TRUE/FALSE if the load was successful. It’ll never error. library will actually fail and exit if the package wasn’t loaded (not installed) > tl;dr: use library, unless you’re actually checking to see if something was installed >