class: center, middle, inverse, title-slide # Writing your dissertation with
aggiedown
### Ryan Peek ### 2019/02/12 --- class: inverse # What is `aggiedown`? <html> <div style='float:left'></div> <hr color='#DAAA00' size=1px width=720px> </html> An Rmarkdown template which allows you to write your dissertation using RMarkdown files. <br> -- - Helpful if you are doing a bulk of your work in R/RStudio -- - Eliminates hassle of trying to format your dissertation over and over again -- - click `Knit` and render a UC Davis approved pdf file you can show to all your friends and family<sup>1</sup> -- <br> <center><i> *insert cool hex design here* </i></center> .footnote[ [1] Or maybe your committee. ] --- layout: true class: inverse # Getting Started --- ### Update R and RStudio - Seems simple, but many issues come from trying to work with different (older) versions. - For this demo, I'm using `R 3.5.2 (2018-12-20)` - and RStudio `Version 1.1.463` --- ### Visit the `aggiedown` [README](https://github.com/ryanpeek/aggiedown) Walk through the installation code...the trickiest bits are typically associated with making sure you have a working LaTeX/MiKTex/MacTeX/TinyTeX version. More on this later. --- background-image: url(https://ryanpeek.github.io/img/P1070160.jpg) background-size: 770px background-position: 100% 0% class: top, left, inverse ### Don't *froget* to name your document `index` <br> <br> ![:scale 50%](https://github.com/ryanpeek/aggiedown/blob/master/ucd_dissertation_rmd.png?raw=true) --- layout: false class: inverse, top, left ## General Thoughts - The idea is to allow you to focus on writing...remember the writing part -- - Overall, this was really an amazing tool to get a dissertation done -- - Very flexible/powerful, but remember, it's not a polished tool/package, still rough around the edges --- layout: true class: left ## Tips, Tricks, & Other Stuff --- ### A few packages that came in handy: -- - [`kableExtra`](https://cran.r-project.org/web/packages/kableExtra/vignettes/awesome_table_in_pdf.pdf) -- - `knitr::include_graphics()` ( [see Zev Ross' blog for great rundown](https://www.zevross.com/blog/2017/06/19/tips-and-tricks-for-working-with-images-and-figures-in-r-markdown-documents/), and Yihui's `bookdown` [web-book](https://bookdown.org/yihui/bookdown/figures.html)) -- - [`citr`](https://github.com/crsh/citr) RStudio add-in (+Zotero) for citations. -- - [cowplot](https://cran.r-project.org/web/packages/cowplot/vignettes/introduction.html) & [patchwork](https://github.com/thomasp85/patchwork) for plotting/visualization --- class: left ### Figures: Custom Caption example - Put the caption in the regular Markdown text section, and use it as a reference in the R code chunk: -- *in markdown text* > (ref:Ch1MyFigure) Relationship between eating chocolate and feeling happy as is described with curvilinear regression. A) Mean happiness vs. chocolate eaten; B) Relative influence of type of chocolate on mean happiness. -- *then the R code chunk* ````markdown ```{r MyFigure, results="asis", warnings=FALSE, messages=FALSE, fig.cap='(ref:Ch1MyFigure)', out.height='60%', echo=F} include_graphics("figure/ch1/MyFigure_chocolateAB.pdf") ``` ```` --- <div class="figure"> <img src="chocolate_consumption_figureAB.png" alt="<i>Relationship between eating chocolate and feeling happy as is described with curvilinear regression. A) Mean happiness vs. chocolate eaten; B) Relative influence of type of chocolate on mean happiness.</i>" width="2391" height="40%" /> <p class="caption"><i>Relationship between eating chocolate and feeling happy as is described with curvilinear regression. A) Mean happiness vs. chocolate eaten; B) Relative influence of type of chocolate on mean happiness.</i></p> </div> --- layout: false class: left, inverse ## Acknowledgements -- Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan). -- `bookdown`, `huskydown`, and `gauchodown` all crucial to getting this whole thing going.