class: center, middle, inverse, title-slide # My (long) journey with R ## A lightning talk for the R-Ladies Sydney Group ### Sarah Romanes ### 20 June 2018 --- class: inverse, center, middle # Keep in touch <a href="mailto:sarah.romanes@hotmail.com"><i class="fa fa-paper-plane fa-fw"></i> sarah.romanes@sydney.edu.au</a><br> <a href="http://twitter.com/sarah_romanes"><i class="fa fa-twitter fa-fw"></i> @sarah_romanes</a><br> <a href="http://github.com/sarahromanes"><i class="fa fa-github fa-fw"></i> @sarahromanes</a><br> <a href="http://www.maths.usyd.edu.au"><i class="fa fa-map-marker fa-fw"></i> School of Mathematics and Statistics @ The University of Sydney</a> --- # About Me * 3rd year PhD student at the University of Sydney. * Lectures and tutors first year Statistics (also involves teaching R!) * My research revolves around developing statistical machine learning methods for high dimensional data. <img src="images/about-me.png" height="220" width="700"> --- # Throwback - 2012 My journey with **R** began back in 2012 (nearly 6 years ago!) in first year stats. **R** was introduced as a glorified calculator. <img src="images/LinuxCLgrey.png" height="400"> --- class: inverse, center, middle <iframe src="https://giphy.com/embed/26mfh0x8OswzgxNDO" width="480" height="360" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/peteandpete-season-2-episode-6-26mfh0x8OswzgxNDO">via GIPHY</a></p> --- # A typical first year question $$\text{Suppose } X \sim \mathcal{N}(0,1). \text{What is } P(X \leq 0.8)? $$ ![](index_files/figure-html/cars-1.svg)<!-- --> Answer: ```r pnorm(0.8) ``` ``` ## [1] 0.7881446 ``` --- class: center, middle # Along came sweave in second year... (2013) <img src="images/R2ndyear.jpg" height="400"> --- # ... with its horrible syntax ```r \documentclass{article} \begin{document} \SweaveOpts{concordance=TRUE} \begin{center} {\large \textbf{ STAT2011 Statistical Models} }\\ {\footnotesize\texttt{sydney.edu.au/science/maths/stat2011}} \end{center} \vspace{-1mm} \begin{tabular*}{1.0\linewidth}{@{\extracolsep{\fill}}lr@{}} \hline\noalign{\smallskip} Semester 1, 2013 & Username: \texttt{\Sexpr{Sys.getenv("USER")}} \\ %Michael Stewart\\ \hline \end{tabular*} \begin{center} \textbf{Computer Exercise Week 3}\\Due by the end of your week 4 session\\ \textbf{Last compiled}: \today \end{center} ``` --- # What I was formally taught during my undergraduate degree in R (2012 - 2015)
Statistical modelling techniques
... and through that, baseR (by experience).
Basic report making via Sweave implementation *** **Essentially - a strong focus on Statistics, and less focus on Data Science! R was a means to the end.** --- # What I was NOT formally taught during my undergraduate degree
tidyverse, eg. `ggplot2`, `dplyr`, `purrr` packages
rmarkdown/ xaringan slides/ blogdown
advanced R topics such as functions, object orientated programming, good programming practice
package development
git/ github/ version control *** **I have had to learn (and not yet master) a lot of these things on my own accord during my PhD.** --- class: inverse, center, middle # So, why am I telling you all of this? --- class: center ## 1) Everyone still has something to learn in R, even if we have been using it for a long time Especially those of us who learnt R 'formally'! For example, a lot of us are learning the `tidyverse` along side you! If you ask us for how to do things, we might give you a long baseR solution... <img src="images/harder.jpg" height="300"> --- class: center, middle ## 2) Learning these things takes time and patience, and life does get in the way! <center> <img src="images/tenor.gif" height="400"> </center> --- # My tips on learning R * My best improvements in R came from having clear motivations for WHY I was learning new skills + I learned `ggplot2` to make better data vis for presentations/publications/ packages * Learn from examples! Eg, this presentation was based off Alison Hill's R Ladies talk about blogdown! Work smart, not hard. * Having a mentor is extremely useful. I found my coding to improve drastically after my honours year as I had great guidance from an expert (my supervisor). --- class: center, middle # Thanks! To R Ladies Sydney for allowing me to give this talk today! To Alison Hill [**@apreshill**](https://twitter.com/apreshill) for the R ladies template I base this presentation off today! Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan).