Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
266 lines (203 sloc) 5.11 KB
packages:
- bibtex
- metafor
- grid
- gridExtra
- lme4
- ggplot2
sources:
- R
targets:
all:
depends:
- ms.pdf
- analysis.R
ms.pdf:
command: latex_build("MS.tex", bibliography="output/refs-main.bib", clean=TRUE)
depends:
- figures_main
- ms-suppinfo.pdf
ms-suppinfo.pdf:
command: latex_build("ms-suppinfo.tex", bibliography="output/refs-suppmat.bib", clean=FALSE)
# Don't clean because we need info for cross references
depends:
- figures_suppmat
ms-suppinfo.tex:
depends:
- R/model.R
- GCi
- GIi
- Snapshot
- read_bib
knitr: TRUE
figures_main:
depends:
- output/Fig1.pdf
- output/Fig2.pdf
- output/Fig3.pdf
- output/Fig4.pdf
figures_suppmat:
depends:
- output/FigA1.pdf
- output/FigA2.pdf
- output/FigA3.pdf
- output/FigA4.pdf
- output/FigA5.pdf
- output/FigA6a.pdf
- output/FigA6b.pdf
- output/FigA6c.pdf
- output/FigA7.pdf
- output/FigA8.pdf
- output/FigA9.pdf
- output/GraphicalAbstract.pdf
# ------- Rscript --------------------------
# used to generate output for those who don't like remake
analysis.R:
packages: remake
command: make_script(file=target_name)
# ------- References --------------------------
paper_bib:
command: read.bib("references/paper.bib")
meta_bib:
command: read.bib("references/metaanalyses.bib")
combined_bib:
command: merge_bib_files(meta_bib, paper_bib)
output/refs-main.bib:
command: write.bib(combined_bib, file = target_name)
suppmat_bib:
command: merge_bib_files(combined_bib, read_bib)
output/refs-suppmat.bib:
command: write.bib(suppmat_bib, file = target_name)
read_bib:
command: read.bib("references/read.bib")
# ------- data formatting --------------------
# Data for top 19 traits
AllData:
command: clean_raw_data("data/CompileData.csv")
CleanData:
command: standardise_data(AllData)
# Data for top 5 traits
CompleteData:
command: build_complete_data(CleanData)
CompleteData_inter:
command: Build_intersp_complete_data(CleanData)
IdealData:
command: build_ideal_data(CompleteData)
CoordTable:
command: build_map_data(CleanData)
IdealData_rgr:
command: subset_growth(IdealData, I("RGR"))
IdealData_agr:
command: subset_growth(IdealData, I("AbGR"))
CompleteData_rgr:
command: subset_growth(CompleteData_inter, I("RGR"))
CompleteData_agr:
command: subset_growth(CompleteData_inter, I("AbGR"))
GCi:
command: list_by_trait(CompleteData_inter)
GIi:
command: list_by_trait(IdealData)
GIrgr:
command: list_by_trait(IdealData_rgr)
GIagr:
command: list_by_trait(IdealData_agr)
GCrgr:
command: list_by_trait(CompleteData_rgr)
GCagr:
command: list_by_trait(CompleteData_agr)
## List of article recorded with the snapshot of literature
Snapshot:
command: snapshot_websci("data/ref.traits/WebSci_all.csv")
## Create restricted Dataset: coefficient of correlation are averaged by study
## and by trait
RCi1:
command:
- EffectSizeSum(CompleteData_rgr)
RCi:
command:
- list_by_trait(RCi1)
RIi1:
command:
- EffectSizeSum(IdealData_rgr)
RIi:
command:
- list_by_trait(RIi1)
## Export compiled data
output/data.csv:
command: write.csv(CleanData, target_name, row.names = FALSE)
# ------- plots --------------------
output/Fig1.pdf:
command: figure_1(CleanData)
plot:
height: 3
width: 4
output/Fig2.pdf:
command: figure_2(CompleteData_inter)
plot:
height: 9
width: 4
output/Fig3.pdf:
command: figure_3(GIrgr,GCrgr )
plot:
height: 5
width: 4
output/Fig4.pdf:
command: figure_4(GCi)
plot:
height: 5
width: 4
## Figures appendix
downloads/baad.rds:
command: download_baad(target_name)
packages: downloader
cleanup_level: never
baad:
command: readRDS("downloads/baad.rds")
output/FigA1.pdf: # allometry
command: figure_A1(baad)
plot:
height: 3
width: 9
output/FigA2.pdf: #map
command: figure_A2(CoordTable)
plot:
height: 3
width: 6
output/FigA3.pdf:
command: figure_A3(GCi)
plot:
height: 6
width: 6
output/FigA4.pdf:
command: figure_A4(GIi, GIrgr, GIagr)
plot:
height: 6
width: 5
output/FigA5.pdf:
command: figure_A5(RIi, RCi)
plot:
height: 6
width: 5
output/FigA6a.pdf:
command: figure_A6(GCi, I("SLA"), I("WD"), I(c("a", "b")))
plot: TRUE
output/FigA6b.pdf:
command: figure_A6(GCi, I("Aarea"), I("Seedmass"), I(c("c", "d")))
plot: TRUE
output/FigA6c.pdf:
command: figure_A6.2(GCi, I("Hmax"), I("e"))
plot: TRUE
output/FigA7.pdf:
command: figure_A7(GCi)
plot: TRUE
output/FigA8.pdf:
command: figure_A8(GCi)
plot: TRUE
output/FigA9.pdf:
command: figure_A9(GCi)
plot: TRUE
output/GraphicalAbstract.pdf:
command: figure_graphical_abstract(GIi, GIrgr, GIagr)
plot:
height: 3
width: 4