```{r setup, message=FALSE, error=FALSE, warning=FALSE} # key setups library(sqldf) # to use sql syntax with data frames library(knitr) # knitr for kable tables library(kableExtra) # pretty tables library(sf) # simple features (GIS) library(leaflet) # nice maps library(tools) # md5sum # captions library(captioner) table_nums <- captioner(prefix = "Table") figure_nums <- captioner(prefix = "Figure") # for having DIV tags knitr::knit_hooks$set(class = function(before, options, envir) { if(before){ sprintf("
", options$class) }else{ "
" } }) knitr::opts_chunk$set(warning = FALSE, message = FALSE) # path to this file name if (!interactive()) { fnamepath <- current_input(dir = TRUE) fnamestr <- paste0(Sys.getenv("COMPUTERNAME"), ": ", fnamepath) } else { fnamepath <- "" } ``` # Introduction This example file uses the AMA-like bibliography style. For an example of APA-like bibliography, see [bibliography.html](bibliography.html) and its source code [bibliography.Rmd](bibliography.Rmd). See the source code at the end of this document to see exactly how the references were placed in the text. The examples of what you might see in a manuscript are highlighted in this document as __bold__ text. Typical citations are formatted with square brackets: ``` [@Duncan2008] ``` __Some fascinating stuff was brought to light! [@Duncan2008]__ Multiple citations should be put in one set of square brackets, separated by semicolons: ``` [@Duncan2008, @Saelens2014] ``` __Two studies were completely unrelated [@Duncan2008; @Saelens2014].__ Page numbers can be included, and author can be suppressed by including a hyphen `-` before the `@` symbol (although page numbers are ignored in AMA-likce citations): ``` [-@Kang2013 pp. 1422] ``` __Kang et al. [-@Kang2013 pp. 1422] ignored PA bouts with mean accelerometry counts $\ge$ 2863 per 30 s epoch.__ In-text citations can also be used as ``` text ... @Kang2013 ... more text ``` __Kang et al. @Kang2013 ignored PA bouts with mean accelerometry counts $\ge$ 2863 per 30 s epoch.__ # Position of bibliography The list of cited references is automatically placed at the end of the document. For this document, because the source code should be printed after the references, we can include the following code to place the list of recerences exactly where they are wanted. ```
``` # References

Rendered at `r Sys.time()` # Source code File is at `r fnamestr`. ## R code used in this document ```{r ref.label=knitr::all_labels(), echo=TRUE, eval=FALSE} ``` ## Complete Rmd code ```{r comment=''} cat(readLines(fnamepath), sep = '\n') ```