article.Rmd 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ---
  2. output:
  3. pdf_document:
  4. citation_package: natbib
  5. latex_engine: xelatex
  6. keep_tex: true
  7. dev: cairo_pdf
  8. template: tex_templates/svm-latex-article2.tex
  9. biblio-style: apsr
  10. title: "Another Pandoc Markdown Article Starter and Template"
  11. thanks: "Replication files are available on the author's Github account (http://github.com/svmiller/svm-r-markdown-templates). **Current version**: `r format(Sys.time(), '%B %d, %Y')`; **Corresponding author**: steven.v.miller@gmail.com."
  12. author:
  13. - name: Steven V. Miller
  14. affiliation: Clemson University
  15. - name: A Second Author Who Did Less Work
  16. affiliation: The Ohio State University
  17. - name: A Graduate Student
  18. affiliation: University of Alabama
  19. abstract: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet libero justo. Pellentesque eget nibh ex. Aliquam tincidunt egestas lectus id ullamcorper. Proin tellus orci, posuere sed cursus at, bibendum ac odio. Nam consequat non ante eget aliquam. Nulla facilisis tincidunt elit. Nunc hendrerit pellentesque quam, eu imperdiet ipsum porttitor ut. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Duis vitae nibh mauris. Duis nec sem sit amet ante dictum mattis. Suspendisse diam velit, maximus eget commodo at, faucibus et nisi. Ut a pellentesque eros, sit amet suscipit eros. Nunc tincidunt quis risus suscipit vestibulum. Quisque eu fringilla massa."
  20. keywords: "pandoc, r markdown, knitr"
  21. date: "`r format(Sys.time(), '%B %d, %Y')`"
  22. geometry: margin=1in
  23. #fontfamily: libertineotf
  24. mainfont: cochineal
  25. sansfont: Linux Biolinum O
  26. fontsize: 11pt
  27. # spacing: double
  28. endnote: no
  29. # pandocparas: TRUE
  30. sansitup: TRUE
  31. bibliography: assets/master.bib
  32. header-includes:
  33. - \usepackage{longtable}
  34. - \LTcapwidth=.95\textwidth
  35. - \linespread{1.05}
  36. - \usepackage{hyperref}
  37. ---
  38. ```{r setup, include=FALSE}
  39. knitr::opts_chunk$set(echo = TRUE)
  40. library(tidyverse)
  41. library(stevemisc)
  42. ```
  43. # Introduction
  44. \kant[1]
  45. ## A Subsection in the Introduction
  46. \kant[2-5]
  47. This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. Here's an obligatory citation to @xie2013ddrk.
  48. # Literature Review
  49. \kant[6-14]
  50. # Research Design
  51. \kant[15]
  52. ## Another Subsection From Kant, Who Writes as If He Does Not Want to Be Read
  53. \kant[16-18]
  54. ## Another Subsection
  55. \kant[19-23]
  56. ```{r, echo=F, fig.cap = "A Simple ggplot with the mtcars Data in R", message=F, fig.width=8}
  57. mtcars %>%
  58. ggplot(.,aes(wt, mpg)) + geom_point() +
  59. theme_steve_web() +
  60. geom_smooth(method="lm") +
  61. labs(caption = "Data: 1974 Motor Trend US magazine",
  62. x = "Weight (1,000 Pounds)",
  63. y = "(U.S.) Miles per Gallon")
  64. ```
  65. When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
  66. ```{r cars}
  67. summary(cars)
  68. ```
  69. # Results
  70. \kant[24]
  71. ## Including Plots
  72. You can also embed plots, for example:
  73. ```{r pressure, echo=FALSE}
  74. plot(pressure)
  75. ```
  76. Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
  77. \kant[25-35]
  78. ```{r}
  79. plot(mtcars)
  80. ```
  81. # Conclusion
  82. \kant[36-40]
  83. \newpage