Skip to content

Commit

Permalink
Fix CSL file for SI
Browse files Browse the repository at this point in the history
  • Loading branch information
joelnitta committed Jan 20, 2022
1 parent 4a008dc commit 6ad3ef2
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions ms/SI.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ output:
fig_caption: yes
keep_tex: no
latex_engine: xelatex
pandoc_args: [ "--csl", "apa-6th-edition.csl"]
pandoc_args: [ "--csl", "american-journal-of-botany.csl"]
header-includes:
- \usepackage{float} # keep figures from floating away
- \usepackage{booktabs} # need for kable tables
Expand Down Expand Up @@ -89,11 +89,12 @@ tar_load(c(
"protected_areas",
"deer_range",
"biodiv_ferns_spatial_lumped",
"bioregion_cutoff"
"bioregion_cutoff",
"ms_functions"
))
```

```{r load-captions}
```{r load-captions, cache = FALSE}
# Source captions numbers from MS
#
# So that caption numbers are in order of appearance in MS
Expand Down Expand Up @@ -184,24 +185,6 @@ t_test_results_for_table %>%

\clearpage

```{r phy-sig, results = "as-is"}
phy_sig_results %>%
mutate(across(c(kval, lambda, k_pval, lambda_pval), ~format(., digits = 2))) %>%
# format for kable/latex
mutate(trait = str_replace_all(trait, "_", "\\\\_")) %>%
rename(
"Trait" = trait,
`\\textit{K}` = kval, `\\textit{P}(\\textit{K})` = k_pval,
`λ` = lambda, `\\textit{P}(λ)` = lambda_pval,
`\\textit{N}` = n) %>%
kbl(booktabs = TRUE, escape = FALSE, format = "latex") %>%
kable_styling(latex_options = c("striped", "HOLD_position"))
```

**`r s_table("phy-sig")`**. Phylogenetic signal in continuous functional traits of the ferns of Japan. *K*, Blomberg's *K*; λ, Pagel's λ.

\clearpage

```{r phy-sig-binary, results = "as-is"}
binary_sig_results %>%
select(trait, D, num_present, num_absent, prob_random, prob_brownian) %>%
Expand All @@ -226,6 +209,24 @@ binary_sig_results %>%

\clearpage

```{r phy-sig, results = "as-is"}
phy_sig_results %>%
mutate(across(c(kval, lambda, k_pval, lambda_pval), ~format(., digits = 2))) %>%
# format for kable/latex
mutate(trait = str_replace_all(trait, "_", "\\\\_")) %>%
rename(
"Trait" = trait,
`\\textit{K}` = kval, `\\textit{P}(\\textit{K})` = k_pval,
`λ` = lambda, `\\textit{P}(λ)` = lambda_pval,
`\\textit{N}` = n) %>%
kbl(booktabs = TRUE, escape = FALSE, format = "latex") %>%
kable_styling(latex_options = c("striped", "HOLD_position"))
```

**`r s_table("phy-sig")`**. Phylogenetic signal in continuous functional traits of the ferns of Japan. *K*, Blomberg's *K*; λ, Pagel's λ.

\clearpage

```{r lrt-null, results = "as-is"}
# Need to keep the input data separate for pack_rows()
lrt_table_data <-
Expand Down

0 comments on commit 6ad3ef2

Please sign in to comment.