Skip to content

Commit

Permalink
v2.1.3
Browse files Browse the repository at this point in the history
Merge branch 'experimental' into dev

# Conflicts:
#	docs/404.html
#	docs/CONDUCT.html
#	docs/LICENSE-text.html
#	docs/LICENSE.html
#	docs/articles/co2-response.html
#	docs/articles/hydraulic-vulnerability.html
#	docs/articles/index.html
#	docs/articles/light-respiration.html
#	docs/articles/light-response.html
#	docs/articles/mesophyll-conductance.html
#	docs/articles/modeling-recommendations.html
#	docs/articles/photosynthesis-introduction.html
#	docs/articles/pressure-volume.html
#	docs/articles/sensitivity-analysis.html
#	docs/articles/stomatal-conductance.html
#	docs/articles/temperature-response.html
#	docs/authors.html
#	docs/index.html
#	docs/news/index.html
#	docs/pkgdown.yml
#	docs/reference/A_supply.html
#	docs/reference/CO2_conductance.html
#	docs/reference/FvCB.html
#	docs/reference/J.html
#	docs/reference/analyze_sensitivity.html
#	docs/reference/aq_response.html
#	docs/reference/bake.html
#	docs/reference/bake_par.html
#	docs/reference/baked-class.html
#	docs/reference/calculated-parameters.html
#	docs/reference/compile_data.html
#	docs/reference/compute_sensitivity.html
#	docs/reference/constants.html
#	docs/reference/enviro_par.html
#	docs/reference/fit_PV_curve.html
#	docs/reference/fit_aci_response.html
#	docs/reference/fit_aq_response.html
#	docs/reference/fit_aq_response2.html
#	docs/reference/fit_g_mc_variableJ.html
#	docs/reference/fit_gs_model.html
#	docs/reference/fit_hydra_vuln_curve.html
#	docs/reference/fit_many.html
#	docs/reference/fit_photosynthesis.html
#	docs/reference/fit_r_light.html
#	docs/reference/fit_r_light2.html
#	docs/reference/fit_t_response.html
#	docs/reference/gs_models.html
#	docs/reference/index.html
#	docs/reference/j_calculations.html
#	docs/reference/leaf_par.html
#	docs/reference/make_parameters.html
#	docs/reference/models.html
#	docs/reference/parameter_names.html
#	docs/reference/photo_parameters.html
#	docs/reference/photosynthesis-package.html
#	docs/reference/photosynthesis.html
#	docs/reference/ppm2pa.html
#	docs/reference/print_graphs.html
#	docs/reference/read_li6800.html
#	docs/reference/read_licor.html
#	docs/reference/required_variables.html
#	docs/reference/simulate_error.html
#	docs/reference/t_functions.html
#	man/simulate_error.Rd
  • Loading branch information
cdmuir committed May 11, 2023
2 parents a54be73 + 80e4117 commit c8717f8
Show file tree
Hide file tree
Showing 71 changed files with 244 additions and 129 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: photosynthesis
Version: 2.1.2.9002
Date: 2023-05-08
Version: 2.1.3
Date: 2023-05-11
Title: Tools for Plant Ecophysiology & Modeling
Authors@R: c(
person("Joseph", "Stinziano", email = "josephstinziano@gmail.com", role = "aut", comment = c(ORCID = "0000-0002-7628-4201")),
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# photosynthesis (development version)
# photosynthesis 2.1.3

* Added example LI6800 data set (inst/extdata/li6800_example) for unit testing `read_licor()`
* Soft-deprecated `read_li6800()` in favor of `read_licor()`
* Soft-deprecated `fit_many()` in favor of generic methods like `purrr::map()`

Expand Down
30 changes: 15 additions & 15 deletions R/simulate_error.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@
#'
#' `r lifecycle::badge("experimental")`
#'
#' @param ph_out A data frame of output from [photo()] or [photosynthesis()]
#' @param ph_out A data frame of output from `photo()` or `photosynthesis()`
#' with units.
#' @param chamber_pars A data frame with a single row of chamber parameters.
#' Required parameters are:
#'
#' * `flow` (\eqn{\mu}mol / s): chamber flow rate
#' * `leaf_area` \[cm ^ 2\]: leaf area in chamber
#' * `sigma_CO2_s` \[\eqn{\mu}mol / mol\]: standard deviation of sample \[CO\eqn{_2}\] measurement error
#' * `sigma_CO2_r` \[\eqn{\mu}mol / mol\]: standard deviation of reference [CO\eqn{_2}\]
#' * `sigma_H2O_s` \[mmol / mol\]: standard deviation of sample \[H\eqn{_2}O\] measurement error
#' * `sigma_H2O_r` \[mmol / mol\]: standard deviation of sample \[H\eqn{_2}O\] measurement error
#'
#' Units for `flow` and `leaf_area` should be provided; units are implied for
#' sigma's but not necessary to specify because `rnorm()` drop units.
#'
#' See Note below for table of required parameters.
#' @param n Integer. Number of replicated simulations per row of `ph_out`.
#' @param use_tealeaves Flag. The **tealeaves** package uses a slightly
#' different equation to calculate the saturating water content of air as a
Expand Down Expand Up @@ -62,10 +51,21 @@
#' | `C_i` | derived | Intercellular CO\eqn{_2} concentration (measured) \[\eqn{\mu}mol/mol\] |
#'
#' @note
#' The required parameters for the `chamber_pars` argument are:
#'
#' * `flow` \[\eqn{\mu}mol / s\]: chamber flow rate
#' * `leaf_area` \[cm ^ 2\]: leaf area in chamber
#' * `sigma_CO2_s` \[\eqn{\mu}mol / mol\]: standard deviation of sample \[CO\eqn{_2}\] measurement error
#' * `sigma_CO2_r` \[\eqn{\mu}mol / mol\]: standard deviation of reference [CO\eqn{_2}\]
#' * `sigma_H2O_s` \[mmol / mol\]: standard deviation of sample \[H\eqn{_2}O\] measurement error
#' * `sigma_H2O_r` \[mmol / mol\]: standard deviation of sample \[H\eqn{_2}O\] measurement error
#'
#' Units for `flow` and `leaf_area` should be provided; units are implied for sigma's but not necessary to specify because `rnorm()` drop units.
#'
#' To evaluate the accuracy and precision of parameter estimation methods, it
#' may be useful to simulate data with realistic measurement error. This
#' function takes output from from [photo()] or [photosynthesis()] models, adds
#' measurement error in CO\eqn{_2} and H\eqn{_2}O concentrations, and calculates
#' function takes output from from `photo()` or `photosynthesis()` models, adds
#' measurement error in CO\eqn{_2} and H\eqn{_2}O concentrations, and calculates
#' parameter estimates with synthetic data. Currently, the function assumes a
#' simplified 1-dimensional CO\eqn{_2} and H\eqn{_2}O conductance model: zero
#' cuticular conductance, infinite boundary layer conductance, and infinite
Expand Down
13 changes: 4 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
## Summary of new changes

* Updated CITATION using `bibentry()` instead of `citEntry()`
* Resolved **purrr** deprecations
* removed `expect_no_condition()` from unit tests to resolved issue #12
* Replaced `dplyr::progress_estimated()` with `progress::progress_bar()`
* Fixed error in `photo(..., use_tealeaves = TRUE)`. User-defined changes in stomatal conductance ratio were not being passed to **tealeaves**.
* Added evaporation (E) to `photo()` and `photosynthesis()` output when `use_tealeaves = TRUE`
* Fixed issue with **lifecycle** badges
* Added new function `simulate_error()` to simulate measurement error in gas exchange measurements.
* Added example LI6800 data set (inst/extdata/li6800_example) for unit testing `read_licor()`
* Soft-deprecated `read_li6800()` in favor of `read_licor()`
* Soft-deprecated `fit_many()` in favor of generic methods like `purrr::map()`

## Test environments
* local R installation, R 4.2.3
Expand All @@ -21,6 +16,6 @@
## R CMD check results

❯ checking installed package size ... NOTE
installed size is 7.1Mb
installed size is 7.2Mb
sub-directories of 1Mb or more:
doc 6.1Mb
8 changes: 8 additions & 0 deletions data-raw/li6800_example.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## code to prepare `li6800_example` dataset goes here

usethis::use_data(li6800_example, overwrite = TRUE)

file.copy(
"/Users/cdmuir/Library/CloudStorage/GoogleDrive-cdmuir@hawaii.edu/Shared drives/muir-lab/adaptive-amphistomy/raw-data/licor/2023-04-23-0804_logdata",
"inst/extdata/li6800_example"
)
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/co2-response.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/hydraulic-vulnerability.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/light-respiration.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/light-response.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/mesophyll-conductance.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/modeling-recommendations.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/photosynthesis-introduction.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/pressure-volume.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/sensitivity-analysis.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/stomatal-conductance.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/temperature-response.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c8717f8

Please sign in to comment.