You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 line
4.4KB

  1. ---
  2. title: "Bulma Test"
  3. subtitle: "A minimal Bulma RMarkdown Template"
  4. author:
  5. - name: Garrick Aden-Buie
  6. url: https://garrickadenbuie.com
  7. extra:
  8. - "Moffitt Cancer Center"
  9. - "[@grrrck](https://twitter.com/grrrck)"
  10. - name: Travis Gerke
  11. url: https://travisgerke.com
  12. extra:
  13. - "Moffitt Cancer Center"
  14. - "@travisgerke"
  15. date: '`r strftime(Sys.time(), "%A, %B %e, %Y")`'
  16. bulma:
  17. hero: ["dark", "bold"]
  18. hero_button: ["light", "outlined"]
  19. hero_links:
  20. - name: Github
  21. url: https://github.com/gerkelab
  22. icon: '`r bulma::fa_icon("github")`'
  23. - name: Home
  24. url: https://gerkelab.com
  25. icon: "fas fa-home"
  26. output:
  27. bulma::bulma_document:
  28. keep_md: TRUE
  29. toc: yes
  30. toc_depth: 2
  31. # css: custom.css
  32. rmarkdown::html_document: default
  33. html_document_base:
  34. pandoc_args: ["--template", "/Users/4468739/work/bulmaRmd/inst/bulma/bulma-min.html" ]
  35. md_document: default
  36. bibliography: bibfile.bib
  37. ---
  38. ```{r setup, include=FALSE}
  39. knitr::opts_chunk$set(echo = TRUE)
  40. ```
  41. <!--
  42. <div class="level">
  43. <div class="level-item has-text-centered">
  44. <div>
  45. <p class="title is-5">Garrick Aden-Buie</p>
  46. <p class="subtitle is-6">Moffitt Cancer Center<br>&commat;grrrck<br>garrickadenbuie.com</p>
  47. </div>
  48. </div>
  49. <div class="level-item has-text-centered">
  50. <div>
  51. <p class="title is-5">Travis Gerke</p>
  52. <p class="subtitle is-6">Moffitt Cancer Center<br>&commat;travisgerke<br>travisgerke.com</p>
  53. </div>
  54. </div>
  55. </div>
  56. -->
  57. # Introduction
  58. A bit of an _introduction_ here. We no longer need to start an article by writing this:
  59. ```latex
  60. \documentclass{article}
  61. \begin{document}
  62. \end{document}
  63. ```
  64. # Bulma Tests
  65. ::::::{.columns}
  66. :::::{.column .is-half .is-offset-one-quarter}
  67. ::::{.message}
  68. :::{.message-header}
  69. This is just a test
  70. :::
  71. :::{.message-body}
  72. Things could change dramatically.
  73. :::
  74. ::::
  75. :::::
  76. ::::::
  77. `r bulma::bulma_level("Home", "Menu", "Bulma", "Reservations", "Contact")`
  78. `r bulma::bulma_level("Tweets" = 3456, Following = 123, Followers = "456K", Likes = 789, style = "header")`
  79. # Start with a cool section
  80. You can use traditional **Markdown** syntax, such as [links](http://yihui.name/knitr) and `code`. Here is a quote:
  81. > A girl phoned me the other day and said "Come on over, there's nobody home." I went over. Nobody was home. -- Rodney Dangerfield
  82. # Followed by another section
  83. Of course you can write lists:
  84. - apple
  85. - pear
  86. - banana
  87. Or ordered lists:
  88. 1. items
  89. 1. will
  90. 1. be
  91. 1. ordered
  92. - nested
  93. - items
  94. # Okay, some R code
  95. ```{r linear-model}
  96. fit = lm(dist ~ speed + I(speed^2), data = cars)
  97. b = coef(fit) # coefficients
  98. summary(fit)
  99. ```
  100. The code will be highlighted in all output formats.
  101. # And some pictures
  102. ```{r lm-vis, fig.cap='Regression diagnostics', fig.height=5}
  103. par(mfrow = c(2, 2), pch = 20, mar = c(4, 4, 2, .1), bg = 'white')
  104. plot(fit)
  105. ```
  106. # A little bit math
  107. Our regression equation is $Y=`r b[1]`+`r b[2]`x$, and the model is:
  108. $$Y = \beta_0 + \beta_1 x + \epsilon$$
  109. ## Some math still has issues
  110. This is the equation for the PDF of the normal distribution.
  111. It currently isn't rendering correctly.
  112. $$\frac{1}{\sigma\sqrt{2\pi}}\,e^{ -\frac{(x-\mu)^2}{2\sigma^2} }$$
  113. # Pandoc extensions {.tabs}
  114. ## Definition lists
  115. Programmer
  116. : A programmer is the one who turns coffee into code.
  117. LaTeX
  118. : A simple tool that is nothing but a couple of backslashes.
  119. ## Examples
  120. We have some examples.
  121. (@) Think what is `0.3 + 0.4 - 0.7`. Zero. Easy.
  122. (@weird) Now think what is `0.3 - 0.7 + 0.4`. Still zero?
  123. People are often surprised by (@weird).
  124. ## Tables
  125. A table here.
  126. Table: Demonstration of simple table syntax.
  127. Right Left Center Default
  128. ------- ------ ---------- -------
  129. 12 12 12 12
  130. 123 123 123 123
  131. 1 1 1 1
  132. You can also generate tables easily using `knitr::kable()` or the **pander** package.
  133. ```{r}
  134. knitr::kable(head(iris))
  135. ```
  136. ## Footnotes
  137. We can also write footnotes[^1].
  138. [^1]: hi, I'm a footnote
  139. Or write some inline footnotes^[as you can see here].
  140. ## Citations
  141. We compile the R Markdown file to Markdown through **knitr** [@xie2015] in R [@R-base]. For more about @xie2015, see <http://yihui.name/knitr>.
  142. <div class="tabs is-left is-boxed is-fullwidth">
  143. <ul>
  144. <li class="is-active"><a>Pictures</a></li>
  145. <li><a>Music</a></li>
  146. <li><a>Videos</a></li>
  147. <li><a>Documents</a></li>
  148. </ul>
  149. </div>
  150. # References