Skip to content

Commit

Permalink
Restructure documents and vignettes for website (#398)
Browse files Browse the repository at this point in the history
Closes #394 Closes #195
  • Loading branch information
dfalster authored May 22, 2024
1 parent 68805e3 commit 226e0b3
Show file tree
Hide file tree
Showing 52 changed files with 1,632 additions and 486 deletions.
12 changes: 12 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,17 @@
^inst/scripts$
^inst/website$
^inst/RcppR6*$
^gh-pages$
^Meta$
^water_bucket_submodel$
^vignettes/articles$
^vignettes/demography.Rmd$
^vignettes/emergent.Rmd$
^vignettes/example_analysis.Rmd$
^vignettes/extrinsic_drivers.Rmd$
^vignettes/individuals.Rmd$
^vignettes/package_organisation.Rmd$
^vignettes/parameters.Rmd$
^vignettes/patch.Rmd$
^vignettes/self_thinning.Rmd$
^vignettes/strategy_new.Rmd$
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
inst/website
inst/docs/*.md
inst/docs/figure
inst/doc
inst/doc*
gh-pages
*Rproj*
*.Rhistory*
^plant.Rcheck$
Expand Down
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Imports:
purrr
Suggests:
testthat,
pkgdown,
here,
deSolve,
numDeriv,
parallel,
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,4 @@ clean:
vignettes:
Rscript -e "devtools::build_vignettes()"

website: vignettes
Rscript -e "pkgdown::build_site()" /
open "inst/website/index.html"

.PHONY: all compile doc clean test attributes roxygen install build check vignettes website push_website
.PHONY: all compile doc clean test attributes roxygen install build check vignettes
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ An overview of the plant package is given by the above publication. Further back

Plant is a complex package, using [c++14](https://en.wikipedia.org/wiki/C%2B%2B14) behind the scenes for speed with [R6 classes](https://cran.r-project.org/web/packages/R6/vignettes/Introduction.html) (via the [Rcpp](https://cran.r-project.org/web/packages/Rcpp/index.html) and [RcppR6](https://github.com/richfitz/RcppR6) packages). In this blog post, Rich FitzJohn and I describe the [key technologies used to build the plant package](https://methodsblog.wordpress.com/2016/02/23/plant/).

If you are interested in developing plant you should read the [Developer Notes](https://traitecoevo.github.io/plant/articles/developer_notes.html).
If you are interested in developing plant you should read the Developer Notes.

## Installation

Expand Down
56 changes: 0 additions & 56 deletions _pkgdown.yml

This file was deleted.

2 changes: 1 addition & 1 deletion inst/docs/demography-vars.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $A_{\rm l}(H)$,m$^2$,Leaf area of a plant with height $H$
**Abundance measures**,,
$P(a)$,yr$^{-1}$,Frequency-density of patches of age $a$
$Y_{x}$,m$^{-2}$ yr$^{-1}$,Global birth rate for a species with traits $x$
"$N(H | x, a)$",m$^{-1}$ m$^{-2}$,Density of plants at height $H$ per unit ground area for given traits $x$ and patch age $a$
"$N(H, x, a)$",m$^{-1}$ m$^{-2}$,Density of plants at height $H$ per unit ground area for given traits $x$ and patch age $a$
**Demographic rates**,,
"$g(x, H, E_a)$",m yr$^{-1}$,Height growth rate of a plant with traits $x$ and height $H$ in the light environment $E_a$ in a patch of age $a$
"$f(x, H, E_a)$",yr$^{-1}$,Seed production rate of a plant with traits $x$ and height $H$ in the light environment $E_a$ in a patch of age $a$
Expand Down
183 changes: 183 additions & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
url: https://traitecoevo.github.io/plant/

destination: gh-pages

template:
bootstrap: 5
bootswatch: cosmo

navbar:
title: "plant"
type: inverse
left:
- text: "Home"
icon: fa-home
href: index.html
- text: "Getting Started"
icon: fa-tree
href: articles/plant.html
- text: "Package functions"
icon: fa-list
href: reference/index.html
- text: "Articles"
icon: fa-book
menu:
- text: -------
- text: "Theory"
- text: "Demography of individuals, patches, and metacommunities"
href: articles/demography.html
- text: "Numerical methods for solving equations"
href: articles/methods/solving_dynamics.html
- text: "The node spacing algorithm"
href: articles/blog/node_spacing.html
- text: -------
- text: "Models"
- text: "The TF24 model"
href: articles/models/strategy_TF24.html
- text: "The FF16 model"
href: articles/models/strategy_FF16.html
- text: "The K93 model"
href: articles/models/strategy_K93.html
- text: -------
- text: "Examples"
- text: "Example analysis"
href: articles/example_analysis.html
- text: "Changing parameters"
href: articles/parameters.html
- text: "Self thinning"
href: articles/self_thinning.html
- text: "Individual plants"
href: articles/individuals.html
- text: "Patches of competing plants"
href: articles/patch.html
- text: "Emergent properties of patches"
href: articles/emergent.html
- text: "Utilising Extrinsic Drivers"
href: articles/extrinsic_drivers.html
- text: -------
- text: "Developer Notes"
- text: "Organisation of the package"
href: articles/package_organisation.html
- text: "Implementing a new strategy"
href: articles/strategy_new.html
- text: "Blog"
icon: fa-terminal
desc: >
These articles are used to record experiments, that are not expected to continue working into the future.
menu:
- text: "2021-water_bucket_model"
href: articles/blog/2021-water_bucket_model.html

right:
- text: "News"
icon: fa-newspaper-o
href: news/index.html
- text: "Github"
icon: fa-github fa-lg
href: https://github.com/traitecoevo/plant

reference:

- title: Setup
desc:
contents:
- Control
- scm_base_control
- fast_control
- build_schedule
- plant_log_console
- scm_base_parameters
- trait_matrix
- expand_parameters
- strategy_list
- make_hyperpar
- Disturbance_Regime
- Weibull_Disturbance_Regime
- No_Disturbance

- title: Growing individuals
contents:
- Individual
- grow_individual_to_size
- grow_individual_to_time
- optimise_individual_rate_at_size_by_trait
- resource_compensation_point

- title: Running patches
desc:
contents:
- run_scm
- run_scm_collect
- run_stochastic_collect

- title: Manipulating outputs
contents:
- tidy_env
- tidy_individual
- tidy_patch
- tidy_species
- integrate_over_size_distribution
- interpolate_to_heights
- interpolate_to_times
- plot_size_distribution

- title: FF16 model
desc: Functions for runnign the FF16 model
contents:
- contains("FF16_")

- title: FF16r model
desc: Functions for runnign the FF16r model
contents:
- contains("FF16r_")

- title: FF16w model
desc: Functions for runnign the FF16w model
contents:
- contains("FF16w_")


- title: K93 model
desc: Functions for runnign the K93 model
contents:
- contains("K93_")

- title: TF24 model
desc: Functions for runnign the TF24 model
contents:
- contains("TF24_")

- title: Development & testing
contents:
- run_plant_benchmarks
- validate

- title: Helpers
desc: Small function used in vignettes. Remove from package?
contents:
- bounds
- clamp_domain
- seq_log
- rbind_list
- make_transparent
- splinefun_log

- title: Numerical methods
desc: You're unlikely to run these unless you're diving deep into the code
contents:
- environment_type
- Internals
- Interpolator
- OdeControl
- NodeSchedule
- QK
- nlsolve

- title: Review if still needed
contents:
- make_scm_integrate
- node_schedule_times_default
- make_reference_plant
- make_reference_plant_FF16
- make_patch

Loading

0 comments on commit 226e0b3

Please sign in to comment.