A collection of R tips gathered over 2018 for the advent calendar series.
- Use Projects and
hereall the time - Use
namerfor naming code chunks - Pipes are syntactic sugar
- Use
+ NULLinggplot2for easy commenting out of layers - DOI! Or else. DOI to BIBTEX.
leaflet,highcharteretc are htmlwidgets- Use
tidyverserather than loadingdplyralone forcatsmakes life so much easier for reordering ggplot features- Use
stylerandlintr - Process free-text gender responses with gendercoder
- If you’re doing GIS and you haven’t started using the
sfpackage, switch now! - Xaringan is the best option for slides
visNetworkis incredibly slow at doing layouts! Always usevisIgraphLayout- Use
my_data |> View(title = "just imported") usethismassively simplifies project developmentrfigshareis slightly frustrating to use — here are the gotchas- You’re showing your age if you’re still using
shinyUI()andshinyServer() shinycontrols dependent on data need to be made in the server- Consider accessibility when writing blogposts: r-resources.massey.ac.nz/rmarkdown
- Bookdown for anything longer than a few paragraphs!
- Include your ORCID number in package DESCRIPTION files
- Sometimes you need a pick-me up. Try out praise 🎉