From 4fc73eff95005c4bbe6af4013634d3fa8746a50e Mon Sep 17 00:00:00 2001 From: AparicioJohan Date: Tue, 9 Jul 2024 21:46:34 -0500 Subject: [PATCH] add index used when modelling --- R/06_modeler.R | 7 +++++-- R/utils_S3_methods_print.R | 3 ++- README.Rmd | 2 +- README.md | 28 ++++++++++++++------------- docs/index.html | 14 +++++++------- docs/pkgdown.yml | 2 +- docs/reference/canopy_HTP.html | 4 ++-- docs/reference/height_HTP.html | 10 +++++----- docs/reference/maturity_HTP.html | 4 ++-- docs/reference/metrics_HTP.html | 4 ++-- docs/reference/modeler_HTP.html | 15 +++++++++----- docs/reference/plot.modeler_HTP.html | 12 ++++++------ docs/reference/print.modeler_HTP.html | 6 +++--- docs/search.json | 2 +- index.Rmd | 2 +- index.md | 26 +++++++++++++------------ man/modeler_HTP.Rd | 5 ++++- 17 files changed, 81 insertions(+), 65 deletions(-) diff --git a/R/06_modeler.R b/R/06_modeler.R index 3d5f98c..16c4587 100644 --- a/R/06_modeler.R +++ b/R/06_modeler.R @@ -19,6 +19,7 @@ #' @param metric A character string specifying the metric to minimize. Can be "sse", "mae", "mse" or "rmse". Default is "sse". #' @param n_points Number of time points to approximate the Area Under the Curve (AUC). 1000 by default. #' @param max_time Maximum time value for calculating the AUC. \code{NULL} by default takes the last time point. +#' @param control A list of control parameters to be passed to the optimization function. e.g. list(maxit = 500) #' @return An object of class \code{modeler_HTP}, which is a list containing the following elements: #' \describe{ #' \item{\code{param}}{A data frame containing the optimized parameters and related information.} @@ -82,7 +83,8 @@ modeler_HTP <- function(x, fn = "fn_piwise", metric = "sse", n_points = 1000, - max_time = NULL) { + max_time = NULL, + control = list()) { if (!inherits(x, "read_HTP")) { stop("The object should be of read_HTP class") } @@ -200,7 +202,8 @@ modeler_HTP <- function(x, metric = metric, method = method, lower = lower, - upper = upper + upper = upper, + control = control ) |> rownames_to_column(var = "method") |> rename(sse = value) |> diff --git a/R/utils_S3_methods_print.R b/R/utils_S3_methods_print.R index eb47c10..4531032 100644 --- a/R/utils_S3_methods_print.R +++ b/R/utils_S3_methods_print.R @@ -29,8 +29,9 @@ #' print(out) print.modeler_HTP <- function(x, ...) { param <- select(x$param, -c(row, range)) + trait <- unique(x$dt$trait) cat("\nCall:\n") - print(x$fn) + cat(paste(trait, "~",deparse(x$fn)), "\n") cat("\n") if (nrow(param) < 10) { cat("Sum of Squares Error:\n") diff --git a/README.Rmd b/README.Rmd index b4affcb..ea2858d 100644 --- a/README.Rmd +++ b/README.Rmd @@ -164,7 +164,7 @@ mat <- maturity_HTP( x = results, index = "GLI_2", canopy = "Canopy", - plot_id = c(195, 40) + plot_id = c(195, 40, 20) ) ``` diff --git a/README.md b/README.md index 06d21c4..09360ab 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ out <- canopy_HTP(x = results, index = "Canopy", plot_id = c(60, 150)) print(out) Call: -fn_piwise(time, t1, t2, k) +Canopy ~ fn_piwise(time, t1, t2, k) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -134,7 +134,7 @@ Optimization Results `head()`: Metrics: Plots Timing Convergence Iterations - 2 0.7071 secs 100% 273.5 (plot) + 2 0.6357 secs 100% 273.5 (plot) ``` ``` r @@ -164,7 +164,7 @@ ph_1 <- height_HTP( print(ph_1) Call: -fn_exp2_exp(time, t1, t2, alpha, beta) +PH ~ fn_exp2_exp(time, t1, t2, alpha, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -176,8 +176,8 @@ Optimization Results `head()`: 150 W19023-21 62 0.000783 -0.0183 0.00143 33.8 32.9 Metrics: - Plots Timing Convergence Iterations - 2 0.826 secs 100% 964.5 (plot) + Plots Timing Convergence Iterations + 2 0.8743 secs 100% 964.5 (plot) ``` ``` r @@ -208,7 +208,7 @@ mat <- maturity_HTP( x = results, index = "GLI_2", canopy = "Canopy", - plot_id = c(195, 40) + plot_id = c(195, 40, 20) ) ``` @@ -216,20 +216,21 @@ mat <- maturity_HTP( print(mat) Call: -fn_lin_pl_lin2(time, t1, t2, dt, k, beta) +GLI_2 ~ fn_lin_pl_lin2(time, t1, t2, dt, k, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. -1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 +6.229e-06 8.233e-06 1.024e-05 2.310e-04 3.435e-04 6.767e-04 Optimization Results `head()`: - plot genotype t1 t2 dt k beta sse auc t3 - 40 W17043-37 36.9 66.4 13.4 0.369 -0.0106 6.77e-04 16.6 79.9 - 195 W16219-8 39.6 68.3 25.1 0.323 -0.0100 1.02e-05 16.4 93.3 + plot genotype t1 t2 dt k beta sse auc t3 + 20 W17067-7 35.8 68.5 14.5 0.362 -0.00405 6.23e-06 19.0 83.1 + 40 W17043-37 36.9 66.4 13.4 0.369 -0.01057 6.77e-04 16.6 79.9 + 195 W16219-8 39.6 68.3 25.1 0.323 -0.01005 1.02e-05 16.4 93.3 Metrics: - Plots Timing Convergence Iterations - 2 0.6512 secs 100% 341 (plot) + Plots Timing Convergence Iterations + 3 0.9528 secs 100% 444.33 (plot) ``` ``` r @@ -240,5 +241,6 @@ plot(mat, plot_id = c(195, 40)) | plot | genotype | row | range | t1 | t2 | dt | k | beta | sse | auc | t3 | |-----:|:----------|----:|------:|-------:|-------:|-------:|------:|-------:|------:|-------:|-------:| +| 20 | W17067-7 | 6 | 2 | 35.818 | 68.529 | 14.540 | 0.362 | -0.004 | 0.000 | 18.977 | 83.069 | | 40 | W17043-37 | 12 | 3 | 36.880 | 66.416 | 13.438 | 0.369 | -0.011 | 0.001 | 16.615 | 79.854 | | 195 | W16219-8 | 13 | 14 | 39.591 | 68.279 | 25.058 | 0.323 | -0.010 | 0.000 | 16.376 | 93.336 | diff --git a/docs/index.html b/docs/index.html index ac77e17..455920c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -425,7 +425,7 @@

4. Estimating
print(out)
 
 Call:
-fn_piwise(time, t1, t2, k)
+Canopy ~ fn_piwise(time, t1, t2, k) 
 
 Sum of Squares Error:
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
@@ -437,8 +437,8 @@ 

4. Estimating 150 W19023-21 33.8 68.5 40.41 100 5386 34.7 2.88 Metrics: - Plots Timing Convergence Iterations - 2 0.6873 secs 100% 273.5 (plot)

+ Plots Timing Convergence Iterations + 2 0.608 secs 100% 273.5 (plot)
 plot(out, plot_id = c(60, 150))

@@ -513,7 +513,7 @@

5. Modelling Plant Height
print(ph_1)
 
 Call:
-fn_exp2_exp(time, t1, t2, alpha, beta)
+PH ~ fn_exp2_exp(time, t1, t2, alpha, beta) 
 
 Sum of Squares Error:
     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
@@ -526,7 +526,7 @@ 

5. Modelling Plant Height Metrics: Plots Timing Convergence Iterations - 2 0.7988 secs 100% 964.5 (plot)

+ 2 0.7976 secs 100% 964.5 (plot)
 plot(ph_1, plot_id = c(60, 150))

@@ -606,7 +606,7 @@

6. Modelling Maturity
print(mat)
 
 Call:
-fn_lin_pl_lin2(time, t1, t2, dt, k, beta)
+GLI_2 ~ fn_lin_pl_lin2(time, t1, t2, dt, k, beta) 
 
 Sum of Squares Error:
      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
@@ -619,7 +619,7 @@ 

6. Modelling Maturity Metrics: Plots Timing Convergence Iterations - 2 0.5909 secs 100% 341 (plot)

+ 2 0.6441 secs 100% 341 (plot)
 plot(mat, plot_id = c(195, 40))

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 6ae75d5..cbe9e6a 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,7 +5,7 @@ articles: canopy-model: canopy-model.html height-model: height-model.html maturity-model: maturity-model.html -last_built: 2024-07-09T19:16Z +last_built: 2024-07-10T02:33Z urls: reference: https://apariciojohan.github.io/exploreHTP/reference article: https://apariciojohan.github.io/exploreHTP/articles diff --git a/docs/reference/canopy_HTP.html b/docs/reference/canopy_HTP.html index 558f0ed..1f69888 100644 --- a/docs/reference/canopy_HTP.html +++ b/docs/reference/canopy_HTP.html @@ -123,7 +123,7 @@

Examplesprint(out) #> #> Call: -#> fn_piwise(time, t1, t2, k) +#> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -136,7 +136,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 2 0.7085 secs 100% 286 (plot) +#> 2 0.6836 secs 100% 286 (plot) #> diff --git a/docs/reference/height_HTP.html b/docs/reference/height_HTP.html index 06cafc7..da7bdc1 100644 --- a/docs/reference/height_HTP.html +++ b/docs/reference/height_HTP.html @@ -141,7 +141,7 @@

Examplesprint(ph_1) #> #> Call: -#> fn_exp2_lin(time, t1, t2, alpha, beta) +#> PH ~ fn_exp2_lin(time, t1, t2, alpha, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -152,8 +152,8 @@

Examples#> 60 W19026-15 62 0.0011 -0.0166 0.032 38 28.5 #> #> Metrics: -#> Plots Timing Convergence Iterations -#> 1 0.5547 secs 100% 1054 (plot) +#> Plots Timing Convergence Iterations +#> 1 0.536 secs 100% 1054 (plot) #> plot(x = ph_1, plot_id = 60) @@ -169,7 +169,7 @@

Examplesprint(ph_2) #> #> Call: -#> fn_exp2_exp(time, t1, t2, alpha, beta) +#> PH ~ fn_exp2_exp(time, t1, t2, alpha, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -181,7 +181,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 1 0.4536 secs 100% 1071 (plot) +#> 1 0.4449 secs 100% 1071 (plot) #> diff --git a/docs/reference/maturity_HTP.html b/docs/reference/maturity_HTP.html index 43f7bf8..84893b3 100644 --- a/docs/reference/maturity_HTP.html +++ b/docs/reference/maturity_HTP.html @@ -131,7 +131,7 @@

Examplesprint(mat) #> #> Call: -#> fn_lin_pl_lin2(time, t1, t2, dt, k, beta) +#> GLI_2 ~ fn_lin_pl_lin2(time, t1, t2, dt, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -144,7 +144,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 2 0.6867 secs 100% 341 (plot) +#> 2 0.6868 secs 100% 341 (plot) #> diff --git a/docs/reference/metrics_HTP.html b/docs/reference/metrics_HTP.html index d7cbdb9..d482a5c 100644 --- a/docs/reference/metrics_HTP.html +++ b/docs/reference/metrics_HTP.html @@ -121,7 +121,7 @@

Examplesprint(x) #> #> Call: -#> fn_piwise(time, t1, t2, k) +#> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -134,7 +134,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 2 0.7401 secs 100% 290.5 (plot) +#> 2 0.7663 secs 100% 290.5 (plot) #> metrics_HTP(x) #> # A tibble: 2 × 11 diff --git a/docs/reference/modeler_HTP.html b/docs/reference/modeler_HTP.html index 9164fed..0f5a905 100644 --- a/docs/reference/modeler_HTP.html +++ b/docs/reference/modeler_HTP.html @@ -80,7 +80,8 @@

Usage fn = "fn_piwise", metric = "sse", n_points = 1000, - max_time = NULL + max_time = NULL, + control = list() ) @@ -155,6 +156,10 @@

Arguments

Value

@@ -208,7 +213,7 @@

Examplesprint(mat) #> #> Call: -#> fn_lin_pl_lin(time, t1, t2, t3, k, beta) +#> GLI_2 ~ fn_lin_pl_lin(time, t1, t2, t3, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -220,7 +225,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 1 0.8491 secs 100% 896 (plot) +#> 1 0.8224 secs 100% 896 (plot) #> can <- modeler_HTP( x = results, @@ -235,7 +240,7 @@

Examplesprint(can) #> #> Call: -#> fn_piwise(time, t1, t2, k) +#> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -247,7 +252,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 1 0.5214 secs 100% 349 (plot) +#> 1 0.5223 secs 100% 349 (plot) #> diff --git a/docs/reference/plot.modeler_HTP.html b/docs/reference/plot.modeler_HTP.html index fb520c5..f4aaca0 100644 --- a/docs/reference/plot.modeler_HTP.html +++ b/docs/reference/plot.modeler_HTP.html @@ -129,7 +129,7 @@

Examplesmat #> #> Call: -#> fn_lin_pl_lin(time, t1, t2, t3, k, beta) +#> GLI_2 ~ fn_lin_pl_lin(time, t1, t2, t3, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -142,7 +142,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 2 1.6456 secs 100% 1122.5 (plot) +#> 2 1.5733 secs 100% 1122.5 (plot) #> can <- modeler_HTP( @@ -157,7 +157,7 @@

Examplescan #> #> Call: -#> fn_piwise(time, t1, t2, k) +#> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -170,7 +170,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 2 0.8727 secs 100% 547 (plot) +#> 2 0.7778 secs 100% 547 (plot) #> fixed_params <- results$dt_long |> @@ -190,7 +190,7 @@

Examplescan #> #> Call: -#> fn_piwise(time, t1, t2, k) +#> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -203,7 +203,7 @@

Examples#> #> Metrics: #> Plots Timing Convergence Iterations -#> 2 0.7646 secs 100% 312.5 (plot) +#> 2 0.7671 secs 100% 312.5 (plot) #> diff --git a/docs/reference/print.modeler_HTP.html b/docs/reference/print.modeler_HTP.html index ed9dcae..6f202ab 100644 --- a/docs/reference/print.modeler_HTP.html +++ b/docs/reference/print.modeler_HTP.html @@ -108,7 +108,7 @@

Examplesprint(out) #> #> Call: -#> fn_piwise(time, t1, t2, k) +#> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error `scale()`: #> Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -122,8 +122,8 @@

Examples#> 4 W17037-26 39.3 65.5 2.58e-26 99.8 5551 26.1 3.82 #> #> Metrics: -#> Plots Timing Convergence Iterations -#> 11 4.3007 secs 100% 315.09 (plot) +#> Plots Timing Convergence Iterations +#> 11 4.304 secs 100% 315.09 (plot) #> diff --git a/docs/search.json b/docs/search.json index db201b4..0ac28c6 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"loading-libraries","dir":"Articles","previous_headings":"","what":"Loading libraries","title":"Modelling Emergence and Maximun Canopy","text":"","code":"library(exploreHTP) library(dplyr) library(kableExtra) library(ggpubr) library(purrr)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"reading-data-read_htp","dir":"Articles","previous_headings":"","what":"Reading data read_HTP()","title":"Modelling Emergence and Maximun Canopy","text":"","code":"data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = \"Canopy\", row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"data-exploration","dir":"Articles","previous_headings":"","what":"Data exploration","title":"Modelling Emergence and Maximun Canopy","text":"","code":"p1 <- plot(results, type = \"evolution\", return_gg = TRUE) p2 <- plot(results, type = \"time_by_trait\", return_gg = TRUE) ggarrange(p1, p2)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"target-function","dir":"Articles","previous_headings":"","what":"Target Function","title":"Modelling Emergence and Maximun Canopy","text":"fn_piwise() \\[\\begin{equation} f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"fitting-models","dir":"Articles","previous_headings":"","what":"Fitting Models","title":"Modelling Emergence and Maximun Canopy","text":"","code":"mod_1 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\" ) plot(mod_1, plot_id = c(195, 40)) kable(mod_1$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"providing-different-initial-values","dir":"Articles","previous_headings":"","what":"Providing different initial values","title":"Modelling Emergence and Maximun Canopy","text":"","code":"initials <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") |> mutate(t1 = c(40, 60), t2 = c(70, 80), .before = k) kable(initials) mod_2 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", initial_vals = initials ) plot(mod_2, plot_id = c(195, 40)) kable(mod_2$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"fixing-some-parameters-of-the-model","dir":"Articles","previous_headings":"","what":"Fixing some parameters of the model","title":"Modelling Emergence and Maximun Canopy","text":"","code":"fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") kable(fixed_params) mod_3 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params ) plot(mod_3, plot_id = c(195, 40)) kable(mod_3$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"correcting-maximun-value","dir":"Articles","previous_headings":"","what":"Correcting Maximun value","title":"Modelling Emergence and Maximun Canopy","text":"","code":"mod_4 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) plot(mod_4, plot_id = c(195, 40)) kable(mod_4$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"comparing-models","dir":"Articles","previous_headings":"","what":"Comparing Models","title":"Modelling Emergence and Maximun Canopy","text":"","code":"rbind.data.frame( mutate(mod_1$param, mod = \"1\"), mutate(mod_2$param, mod = \"2\"), mutate(mod_3$param, mod = \"3\"), mutate(mod_4$param, mod = \"4\") ) |> filter(plot %in% 40) |> kable()"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"code","dir":"Articles","previous_headings":"","what":"Code","title":"Modelling Emergence and Maximun Canopy","text":"","code":"results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = \"Canopy\", row = \"Row\", range = \"Range\" ) fixed_params <- results$dt_long |> filter(trait %in% \"Canopy\") |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod <- modeler_HTP( x = results, index = \"Canopy\", plot_id = NULL, parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE )"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"loading-libraries","dir":"Articles","previous_headings":"","what":"Loading libraries","title":"Modelling Plant Height","text":"","code":"library(exploreHTP) library(dplyr) library(kableExtra) library(ggpubr) library(purrr)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"reading-data-read_htp","dir":"Articles","previous_headings":"","what":"Reading data read_HTP()","title":"Modelling Plant Height","text":"","code":"data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"PH\", \"Canopy\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"data-exploration","dir":"Articles","previous_headings":"","what":"Data exploration","title":"Modelling Plant Height","text":"","code":"p1 <- plot(results, type = \"evolution\", return_gg = TRUE) p2 <- plot(results, type = \"time_by_trait\", return_gg = TRUE) ggarrange(p1, p2, nrow = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"estimating-days-to-emergence","dir":"Articles","previous_headings":"","what":"Estimating days to emergence","title":"Modelling Plant Height","text":"\\[\\begin{equation} f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"fitting-models-for-canopy","dir":"Articles","previous_headings":"","what":"Fitting models for canopy","title":"Modelling Plant Height","text":"","code":"fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod_1 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) plot(mod_1, plot_id = c(195, 40)) kable(mod_1$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"target-function-for-plant-height","dir":"Articles","previous_headings":"","what":"Target function for plant height","title":"Modelling Plant Height","text":"fn_exp2_exp() \\[\\begin{equation} f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"fixing-parameters-and-providing-initial-values","dir":"Articles","previous_headings":"","what":"Fixing parameters and providing initial values","title":"Modelling Plant Height","text":"","code":"fixed_params <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1) kable(fixed_params) initials <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1, t2) |> mutate(alpha = 1 / 600, beta = -1 / 30) kable(initials)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"fitting-models-for-plant-height","dir":"Articles","previous_headings":"","what":"Fitting models for plant height","title":"Modelling Plant Height","text":"Using t1 previous model fixed parameter using t2 initial parameter per plot.","code":"mod_2 <- modeler_HTP( x = results, index = \"PH\", plot_id = c(195, 40), fn = \"fn_exp2_exp\", initial_vals = initials, fixed_params = fixed_params ) plot(mod_2, plot_id = c(195, 40)) kable(mod_2$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"code","dir":"Articles","previous_headings":"","what":"Code","title":"Modelling Plant Height","text":"","code":"data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"PH\", \"Canopy\"), row = \"Row\", range = \"Range\" ) fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod_1 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) fixed_params <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1) initials <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1, t2) |> mutate(alpha = 1 / 600, beta = -1 / 30) mod_2 <- modeler_HTP( x = results, index = \"PH\", plot_id = c(195, 40), fn = \"fn_exp2_exp\", initial_vals = initials, fixed_params = fixed_params )"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"loading-libraries","dir":"Articles","previous_headings":"","what":"Loading libraries","title":"Modelling Maturity","text":"","code":"library(exploreHTP) library(dplyr) library(kableExtra) library(ggpubr) library(purrr)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"reading-data-read_htp","dir":"Articles","previous_headings":"","what":"Reading data read_HTP()","title":"Modelling Maturity","text":"","code":"data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"data-exploration","dir":"Articles","previous_headings":"","what":"Data exploration","title":"Modelling Maturity","text":"","code":"p1 <- plot(results, type = \"evolution\", return_gg = TRUE) p2 <- plot(results, type = \"time_by_trait\", return_gg = TRUE) ggarrange(p1, p2, nrow = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"target-function-for-maturity","dir":"Articles","previous_headings":"","what":"Target function for maturity","title":"Modelling Maturity","text":"fn_lin_pl_lin() \\[\\begin{equation} f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"fitting-models-for-maturity","dir":"Articles","previous_headings":"","what":"Fitting models for maturity","title":"Modelling Maturity","text":"","code":"mod_1 <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin\", ) plot(mod_1, plot_id = c(195, 40)) kable(mod_1$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"providing-initial-parameters-from-the-canopy-model","dir":"Articles","previous_headings":"","what":"Providing initial parameters from the canopy model","title":"Modelling Maturity","text":"","code":"fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod_2 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) plot(mod_2, plot_id = c(195, 40)) kable(mod_2$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"passing-initial-values","dir":"Articles","previous_headings":"","what":"Passing initial values","title":"Modelling Maturity","text":"","code":"initials <- mod_2 |> pluck(\"param\") |> select(plot, genotype, t1, t2) |> mutate(t3 = 100, k = 0.32, beta = -0.01) kable(initials) mod_3 <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), initial_vals = initials, fn = \"fn_lin_pl_lin\", ) plot(mod_3, plot_id = c(195, 40)) kable(mod_3$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"adding-constrains-to-the-optimization","dir":"Articles","previous_headings":"","what":"Adding constrains to the optimization","title":"Modelling Maturity","text":"","code":"mod_4 <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), parameters = c(t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin2\", method = c(\"nlminb\", \"L-BFGS-B\"), lower = c(-Inf, -Inf, 0, -Inf, -Inf), upper = c(Inf, Inf, Inf, Inf, 0), ) plot(mod_4, plot_id = c(195, 40)) kable(mod_4$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Johan Aparicio. Author, maintainer. Jeffrey Endelman. Contributor. University Wisconsin Madison. Copyright holder.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Aparicio J (2024). exploreHTP: Explore High-Throughput Phenotypic (HTP) Data. R package version 0.1.0, https://github.com/AparicioJohan/exploreHTP, https://apariciojohan.github.io/exploreHTP/.","code":"@Manual{, title = {exploreHTP: Explore High-Throughput Phenotypic (HTP) Data}, author = {Johan Aparicio}, year = {2024}, note = {R package version 0.1.0, https://github.com/AparicioJohan/exploreHTP}, url = {https://apariciojohan.github.io/exploreHTP/}, }"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"explorehtp-","dir":"","previous_headings":"","what":"Explore High-Throughput Phenotypic (HTP) Data","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"exploreHTP designed assist researchers plant breeders efficiently exploring analyzing data derived drone imagery. package offers suite tools tailored unique needs plant breeding data, facilitating comprehensive data exploration, correlation analysis, data manipulation, flexible data modeling.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"can install development version exploreHTP GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"AparicioJohan/exploreHTP\")"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_1-reading-data","dir":"","previous_headings":"","what":"1. Reading Data","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"basic example shows use exploreHTP:","code":"library(exploreHTP) data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" plot(results, type = \"evolution\") head(results$summ_traits)"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_2-plotting-correlations-1","dir":"","previous_headings":"","what":"2. Plotting correlations (1)","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"# Trait by Time table <- plot(results, label_size = 4, signif = TRUE, n_row = 1) head(table)"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_3-plotting-correlations-2","dir":"","previous_headings":"","what":"3. Plotting correlations (2)","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"# Time by Trait table <- plot(results, type = \"time_by_trait\", label_size = 4, signif = TRUE) head(table)"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_4-estimating-days-to-emergence-and-days-to-full-canopy","dir":"","previous_headings":"","what":"4. Estimating days to emergence and days to full canopy","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"out <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(60, 150)) print(out) Call: fn_piwise(time, t1, t2, k) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. 4.894 13.772 22.650 22.650 31.528 40.406 Optimization Results `head()`: plot genotype t1 t2 sse k auc dt slope 60 W19026-15 38.0 68.7 4.89 100 5162 30.6 3.26 150 W19023-21 33.8 68.5 40.41 100 5386 34.7 2.88 Metrics: Plots Timing Convergence Iterations 2 0.6873 secs 100% 273.5 (plot) plot(out, plot_id = c(60, 150))"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_5-modelling-plant-height","dir":"","previous_headings":"","what":"5. Modelling Plant Height","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"ph_1 <- height_HTP( x = results, height = \"PH\", canopy = \"Canopy\", plot_id = c(60, 150), fn = \"fn_exp2_exp\" ) print(ph_1) Call: fn_exp2_exp(time, t1, t2, alpha, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. 0.001433 0.003388 0.005343 0.005343 0.007298 0.009253 Optimization Results `head()`: plot genotype t2 alpha beta sse t1 auc 60 W19026-15 62 0.001168 -0.0346 0.00925 38.0 28.0 150 W19023-21 62 0.000783 -0.0183 0.00143 33.8 32.9 Metrics: Plots Timing Convergence Iterations 2 0.7988 secs 100% 964.5 (plot) plot(ph_1, plot_id = c(60, 150))"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_6-modelling-maturity","dir":"","previous_headings":"","what":"6. Modelling Maturity","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) mat <- maturity_HTP( x = results, index = \"GLI_2\", canopy = \"Canopy\", plot_id = c(195, 40) ) print(mat) Call: fn_lin_pl_lin2(time, t1, t2, dt, k, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. 1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 Optimization Results `head()`: plot genotype t1 t2 dt k beta sse auc t3 40 W17043-37 36.9 66.4 13.4 0.369 -0.0106 6.77e-04 16.6 79.9 195 W16219-8 39.6 68.3 25.1 0.323 -0.0100 1.02e-05 16.4 93.3 Metrics: Plots Timing Convergence Iterations 2 0.5909 secs 100% 341 (plot) plot(mat, plot_id = c(195, 40))"},{"path":"https://apariciojohan.github.io/exploreHTP/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 exploreHTP authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Canopy Modelling — canopy_HTP","title":"Canopy Modelling — canopy_HTP","text":"function performs canopy modelling based time series data high-throughput phenotyping (HTP). optimizes parameters fit specified function canopy data time, potentially correcting maximum values adding zero point series.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canopy Modelling — canopy_HTP","text":"","code":"canopy_HTP(x, index = \"Canopy\", plot_id = NULL, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canopy Modelling — canopy_HTP","text":"x object class read_HTP, containing results read_HTP() function. index string specifying canopy trait modeled. Default \"Canopy\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. ... Additional arguments passed modeler_HTP() function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canopy Modelling — canopy_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame corrected possibly zero-augmented canopy data. fn call used calculate AUC. max_time Maximum time value used calculating AUC.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canopy Modelling — canopy_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) out <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(22, 40)) plot(out, c(22, 40)) print(out) #> #> Call: #> fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.001477 0.075360 0.149243 0.149243 0.223126 0.297009 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc dt slope #> 22 W17047-5 39.5 74.6 0.29701 98.8 5034 35.1 2.81 #> 40 W17043-37 34.8 60.8 0.00148 100.0 6017 26.0 3.84 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.7085 secs 100% 286 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Canopy Modelling — canopy_model","title":"Canopy Modelling — canopy_model","text":"Canopy Modelling","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canopy Modelling — canopy_model","text":"","code":"canopy_model( results, canopy = \"Canopy\", plot_id = NULL, method = FALSE, correct_max = TRUE, add_zero = TRUE )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canopy Modelling — canopy_model","text":"results Object class exploreHTP canopy string plot_id Optional Plot ID. NULL default method TRUE FALSE. see method used optimization table. FALSE default. correct_max Add maximum value reaching local maximum. TRUE default. add_zero TRUE FALSE. Add zero time series.TRUE default.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canopy Modelling — canopy_model","text":"data.frame","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canopy Modelling — canopy_model","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) print(results) #> $summ_traits #> # A tibble: 16 × 12 #> trait time Min Mean Median Max SD CV n #> #> 1 Canopy 29 0 0 0 0 0 NaN 196 #> 2 Canopy 36 0 2.86 1.77 14.5 3.12 1.09 196 #> 3 Canopy 42 0.731 22.7 22.3 44.1 9.00 0.397 196 #> 4 Canopy 56 32.8 74.0 73.7 99.2 12.2 0.165 196 #> 5 Canopy 76 89.6 99.7 100 100 1.05 0.0105 196 #> 6 Canopy 92 63.1 97.1 98.5 100. 4.24 0.0436 196 #> 7 Canopy 100 27.6 82.7 87.5 99.7 14.8 0.179 196 #> 8 Canopy 108 5.15 68.8 74.4 99.1 21.0 0.305 196 #> 9 PH 29 Inf NaN NA -Inf NA NA 0 #> 10 PH 36 -0.0107 0.0232 0.0236 0.0513 0.00877 0.377 176 #> 11 PH 42 -0.0350 0.0719 0.0730 0.205 0.0452 0.629 196 #> 12 PH 56 -0.122 0.0353 0.0218 0.346 0.0802 2.27 196 #> 13 PH 76 0.352 0.563 0.564 0.756 0.0759 0.135 196 #> 14 PH 92 0.220 0.359 0.353 0.527 0.0557 0.155 196 #> 15 PH 100 0.0510 0.234 0.235 0.413 0.0765 0.327 196 #> 16 PH 108 0.261 0.724 0.757 0.988 0.170 0.235 196 #> # ℹ 3 more variables: miss , `miss%` , `neg%` #> #> $exp_design_resum #> # A tibble: 1 × 6 #> n n_gen n_row n_range num_of_reps num_of_gen #> #> 1 196 185 14 14 1_2 174_11 #> #> $locals_min_max #> # A tibble: 2 × 3 #> trait local_min_at local_max_at #> #> 1 Canopy \"\" 76 #> 2 PH \"56_100\" 42_76 #> #> $dt_long #> # A tibble: 3,136 × 7 #> time plot row range genotype trait value #> #> 1 29 1 1 1 W17037-24 Canopy 0 #> 2 29 1 1 1 W17037-24 PH NA #> 3 36 1 1 1 W17037-24 Canopy 0.648 #> 4 36 1 1 1 W17037-24 PH 0.0154 #> 5 42 1 1 1 W17037-24 Canopy 14.4 #> 6 42 1 1 1 W17037-24 PH 0.0173 #> 7 56 1 1 1 W17037-24 Canopy 74.5 #> 8 56 1 1 1 W17037-24 PH 0.0941 #> 9 76 1 1 1 W17037-24 Canopy 99.7 #> 10 76 1 1 1 W17037-24 PH 0.456 #> # ℹ 3,126 more rows #> #> attr(,\"class\") #> [1] \"read_HTP\" out <- canopy_model(results, plot_id = 22)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":null,"dir":"Reference","previous_headings":"","what":"Drone Data in Potato 2022 — dt_chips","title":"Drone Data in Potato 2022 — dt_chips","text":"Vegetative indices biomass related traits potato trial arranged p-rep design.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drone Data in Potato 2022 — dt_chips","text":"","code":"dt_chips"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Drone Data in Potato 2022 — dt_chips","text":"tibble 1568 rows 17 variables: Trial chr trial name DAP dbl denoting Days planting Plot dbl denoting unique plot id Row dbl denoting row coordinate Range dbl denoting range coordinate Gen chr denoting genotype id Yield dbl Total Yield measured end season VineMaturity dbl VineMaturity measure season Red - Canopy dbl denoting drone-derived traits","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Drone Data in Potato 2022 — dt_chips","text":"UW - Potato Breeding Program","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":null,"dir":"Reference","previous_headings":"","what":"Drone Data in Potato 2020 — dt_potato","title":"Drone Data in Potato 2020 — dt_potato","text":"Vegetative indices biomass related traits potato trial arranged p-rep design.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drone Data in Potato 2020 — dt_potato","text":"","code":"dt_potato"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Drone Data in Potato 2020 — dt_potato","text":"tibble 1372 rows 17 variables: Trial chr trial name DAP dbl denoting Days planting Plot dbl denoting unique plot id Row dbl denoting row coordinate Range dbl denoting range coordinate Gen chr denoting genotype id Yield dbl Total Yield measured end season VineMaturity dbl VineMaturity measure season Red - Canopy dbl denoting drone-derived traits","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Drone Data in Potato 2020 — dt_potato","text":"UW - Potato Breeding Program","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":null,"dir":"Reference","previous_headings":"","what":"Piece-wise Regression — fn_canopy","title":"Piece-wise Regression — fn_canopy","text":"Piece-wise Regression","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Piece-wise Regression — fn_canopy","text":"","code":"fn_canopy(t, t1 = 45, t2 = 80, k = 0.9)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Piece-wise Regression — fn_canopy","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time. Default 80. k Numeric. maximum value function. Default 0.9.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Piece-wise Regression — fn_canopy","text":"numeric value based threshold model. t less t1, function returns 0. t t1 t2 (inclusive), function returns value 0 k linear trend. t greater t2, function returns k.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Piece-wise Regression — fn_canopy","text":"$$ f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Piece-wise Regression — fn_canopy","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply(t, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(34.9, 61.8), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Exponential Function 1 — fn_exp1_exp","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"Computes value based exponential growth curve exponential decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"","code":"fn_exp1_exp(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter first exponential term. Must greater 0. beta Numeric. parameter second exponential term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"numeric value based double exponential model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)) - 1. t greater t2, function returns (exp(alpha * (t2 - t1)) - 1) * exp(beta * (t - t2)).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp1_exp\", params = c(t1 = 35, t2 = 55, alpha = 1 / 20, beta = -1 / 30), interval = c(0, 108), n_points = 2000, auc_label_size = 3, y_auc_label = 0.2 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Linear Function 1 — fn_exp1_lin","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"Computes value based exponential growth curve linear decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"","code":"fn_exp1_lin(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter exponential term. Must greater 0. beta Numeric. parameter linear term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"numeric value based exponential linear model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)) - 1. t greater t2, function returns beta * (t - t2) + (exp(alpha * (t2 - t1)) - 1).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\beta \\cdot (t - t_2) + \\left(e^{\\alpha \\cdot (t_2 - t_1)} - 1\\right) & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp1_lin\", params = c(t1 = 35, t2 = 55, alpha = 1 / 20, beta = -1 / 40), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Exponential Function 2 — fn_exp2_exp","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"Computes value based exponential growth curve exponential decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"","code":"fn_exp2_exp(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter first exponential term. Must greater 0. beta Numeric. parameter second exponential term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"numeric value based double exponential model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns (exp(alpha * (t2 - t1)^2) - 1) * exp(beta * (t - t2)).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp2_exp\", params = c(t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 30), interval = c(0, 108), n_points = 2000, auc_label_size = 3, y_auc_label = 0.15 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Linear Function 2 — fn_exp2_lin","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"Computes value based exponential growth curve linear decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"","code":"fn_exp2_lin(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter exponential term. Must greater 0. beta Numeric. parameter linear term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"numeric value based exponential linear model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns beta * (t - t2) + (exp(alpha * (t2 - t1)^2) - 1).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\beta \\cdot (t - t_2) + \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp2_lin\", params = c(t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 80), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Exponential Function — fn_exp_exp","title":"Exponential Exponential Function — fn_exp_exp","text":"Computes value based exponential growth curve exponential decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Exponential Function — fn_exp_exp","text":"","code":"fn_exp_exp(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Exponential Function — fn_exp_exp","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter first exponential term. Must greater 0. beta Numeric. parameter second exponential term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Exponential Function — fn_exp_exp","text":"numeric value based double exponential model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns (exp(alpha * (t2 - t1)^2) - 1) * exp(beta * (t - t2)).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Exponential Function — fn_exp_exp","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Exponential Function — fn_exp_exp","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply( X = t, FUN = fn_exp_exp, t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 30 ) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(35, 55), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Linear Function — fn_exp_linear","title":"Exponential Linear Function — fn_exp_linear","text":"Computes value based exponential growth curve linear decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Linear Function — fn_exp_linear","text":"","code":"fn_exp_linear(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Linear Function — fn_exp_linear","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter exponential term. Must greater 0. beta Numeric. parameter linear term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Linear Function — fn_exp_linear","text":"numeric value based exponential linear model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns beta * (t - t2) + (exp(alpha * (t2 - t1)^2) - 1).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Linear Function — fn_exp_linear","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\beta \\cdot (t - t_2) + \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Linear Function — fn_exp_linear","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply( X = t, FUN = fn_exp_linear, t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 80 ) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(35, 55), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear — fn_lin_pl_lin","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"Linear Plateau Linear","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"","code":"fn_lin_pl_lin(t, t1, t2, t3, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time plateau. Default 80. t3 Numeric. lower threshold time plateau. Default 45. k Numeric. maximum value function. Default 0.9. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"$$ f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_lin_pl_lin\", params = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"Linear Plateau Linear Constrains","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"","code":"fn_lin_pl_lin2(t, t1, t2, dt, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"t Numeric. time value. t1 Numeric. lower threshold time. t2 Numeric. upper threshold time plateau. dt Numeric. dt = t3 - t2. k Numeric. maximum value function. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"$$ f(t; t_1, t_2, dt, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq (t_2 + dt) \\\\ k + \\beta \\cdot (t - (t_2 + dt)) & \\text{} t > (t_2 + dt) \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_lin_pl_lin2\", params = c(t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"Linear Plateau Linear Constrains","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"","code":"fn_lin_pl_lin3(t, t1, t2, t3, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time plateau. Default 80. t3 Numeric. lower threshold time plateau. Default 45. k Numeric. maximum value function. Default 0.9. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"$$ f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_lin_pl_lin3\", params = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"Linear Plateau Linear Constrains","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"","code":"fn_lin_pl_lin4(t, t1, t2, t3, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time plateau. Default 80. t3 Numeric. lower threshold time plateau. Default 45. k Numeric. maximum value function. Default 0.9. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"$$ f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply( X = t, FUN = fn_lin_pl_lin, t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01 ) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(38.7, 62), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Piecewise Linear Regression — fn_piwise","title":"Piecewise Linear Regression — fn_piwise","text":"Computes value based linear growth curve reaching plateau time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Piecewise Linear Regression — fn_piwise","text":"","code":"fn_piwise(t, t1 = 45, t2 = 80, k = 0.9)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Piecewise Linear Regression — fn_piwise","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time. Default 80. k Numeric. maximum value function. Default 0.9. Assumed known.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Piecewise Linear Regression — fn_piwise","text":"numeric value based threshold model. t less t1, function returns 0. t t1 t2 (inclusive), function returns value 0 k linear trend. t greater t2, function returns k.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Piecewise Linear Regression — fn_piwise","text":"$$ f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Piecewise Linear Regression — fn_piwise","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_piwise\", params = c(t1 = 34.9, t2 = 61.8, k = 100), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function — fn_sse","title":"Sum of Squares Error Function — fn_sse","text":"Function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function — fn_sse","text":"","code":"fn_sse(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function — fn_sse","text":"params Numeric vector two parameters. t Independent variable. y Response variable.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function — fn_sse","text":"sum squares error","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function — fn_sse","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) fn_sse(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function — fn_sse_can","title":"Sum of Squares Error Function — fn_sse_can","text":"Calculates sum squared errors (SSE) observed values values predicted fn_canopy function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function — fn_sse_can","text":"","code":"fn_sse_can(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function — fn_sse_can","text":"params Numeric vector. parameters fn_canopy function, params[1] t1 params[2] t2. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function — fn_sse_can","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function — fn_sse_can","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) fn_sse_can(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp_exp function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"","code":"fn_sse_exp(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"params Numeric vector. parameters fn_exp_exp function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 fn_sse_exp(params, t, y, t1) # Should return the SSE value #> [1] 2.708789e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp_linear function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"","code":"fn_sse_lin(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"params Numeric vector. parameters fn_exp_linear function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 fn_sse_lin(params, t, y, t1) # Should return the SSE value #> [1] 2.978768e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"Calculates sum squared errors (SSE) observed values values predicted fn_piwise function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"","code":"fn_sse_piw(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"params Numeric vector. parameters fn_piwise function, params[1] t1 params[2] t2. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) fn_sse_piw(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_piwise, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":null,"dir":"Reference","previous_headings":"","what":"Piece-wise Regression — fun_canopy","title":"Piece-wise Regression — fun_canopy","text":"Piece-wise Regression","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Piece-wise Regression — fun_canopy","text":"","code":"fun_canopy(t, t1 = 45, t2 = 80, k = 0.9)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Piece-wise Regression — fun_canopy","text":"t Numeric value. t1 First break point. t2 t value reach maximum value. k Maximum y value.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Piece-wise Regression — fun_canopy","text":"value","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Piece-wise Regression — fun_canopy","text":"","code":"library(exploreHTP) x <- seq(0, 108, 0.1) y_hat <- sapply(x, FUN = fun_canopy, t1 = 34.9, t2 = 61.8, k = 100) plot(x, y_hat, type = \"l\") lines(x, y_hat, col = \"red\") abline(v = c(34.9, 61.8), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plant Height Modelling — height_HTP","title":"Plant Height Modelling — height_HTP","text":"Plant Height Modelling","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plant Height Modelling — height_HTP","text":"","code":"height_HTP( x, height = \"PH\", canopy = \"Canopy\", plot_id = NULL, fn = c(\"fn_exp1_exp\", \"fn_exp1_lin\", \"fn_exp2_exp\", \"fn_exp2_lin\"), ... )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plant Height Modelling — height_HTP","text":"x object class read_HTP, containing results read_HTP() function. height string specifying plant height trait modeled. Default \"PH\". canopy string specifying canopy trait modeled. Default \"Canopy\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. fn One following options: \"fn_exp1_exp\", \"fn_exp1_lin\", \"fn_exp2_exp\", \"fn_exp2_lin\". ... Additional arguments passed modeler_HTP() function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plant Height Modelling — height_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame data used. fn call used calculate AUC. max_time Maximum time value used calculating AUC.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plant Height Modelling — height_HTP","text":"","code":"library(exploreHTP) data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) ph_1 <- height_HTP( x = results, height = \"PH\", canopy = \"Canopy\", plot_id = 60, fn = \"fn_exp2_lin\" ) print(ph_1) #> #> Call: #> fn_exp2_lin(time, t1, t2, alpha, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.03205 0.03205 0.03205 0.03205 0.03205 0.03205 #> #> Optimization Results `head()`: #> plot genotype t2 alpha beta sse t1 auc #> 60 W19026-15 62 0.0011 -0.0166 0.032 38 28.5 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.5547 secs 100% 1054 (plot) #> plot(x = ph_1, plot_id = 60) ph_2 <- height_HTP( x = results, height = \"PH\", canopy = \"Canopy\", plot_id = 60, fn = \"fn_exp2_exp\" ) plot(x = ph_2, plot_id = 60) print(ph_2) #> #> Call: #> fn_exp2_exp(time, t1, t2, alpha, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.009253 0.009253 0.009253 0.009253 0.009253 0.009253 #> #> Optimization Results `head()`: #> plot genotype t2 alpha beta sse t1 auc #> 60 W19026-15 62 0.00117 -0.0346 0.00925 38 28 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.4536 secs 100% 1071 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Maturity Modelling — maturity_HTP","title":"Maturity Modelling — maturity_HTP","text":"Maturity Modelling","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maturity Modelling — maturity_HTP","text":"","code":"maturity_HTP(x, index = \"GLI\", canopy = \"Canopy\", plot_id = NULL, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maturity Modelling — maturity_HTP","text":"x object class read_HTP, containing results read_HTP() function. index string specifying canopy trait modeled. Default \"GLI\". canopy string specifying canopy trait modeled. Default \"Canopy\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. ... Additional arguments passed modeler_HTP() function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Maturity Modelling — maturity_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame corrected possibly zero-augmented canopy data. fn call used calculate AUC. max_time Maximum time value used calculating AUC.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Maturity Modelling — maturity_HTP","text":"","code":"library(exploreHTP) data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) mat <- maturity_HTP( x = results, index = \"GLI_2\", canopy = \"Canopy\", plot_id = c(195, 40) ) plot(mat, plot_id = c(195, 40)) print(mat) #> #> Call: #> fn_lin_pl_lin2(time, t1, t2, dt, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 #> #> Optimization Results `head()`: #> plot genotype t1 t2 dt k beta sse auc t3 #> 40 W17043-37 36.9 66.4 13.4 0.369 -0.0106 6.77e-04 16.6 79.9 #> 195 W16219-8 39.6 68.3 25.1 0.323 -0.0100 1.02e-05 16.4 93.3 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.6867 secs 100% 341 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Metrics for modeler_HTP — metrics_HTP","title":"Metrics for modeler_HTP — metrics_HTP","text":"Computes various performance metrics modeler_HTP object. function calculates Sum Squared Errors (SSE), Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Coefficient Determination (R-squared).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Metrics for modeler_HTP — metrics_HTP","text":"","code":"metrics_HTP(x, .by_plot = TRUE)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Metrics for modeler_HTP — metrics_HTP","text":"x object class `modeler_HTP` containing necessary data compute metrics. .by_plot Return metrics plot? TRUE default.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Metrics for modeler_HTP — metrics_HTP","text":"data frame containing calculated metrics grouped plot, row, range, genotype, trait.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Metrics for modeler_HTP — metrics_HTP","text":"Sum Squared Errors (SSE): $$SSE = \\sum_{=1}^{n} (y_i - \\hat{y}_i)^2$$Mean Absolute Error (MAE): $$MAE = \\frac{1}{n} \\sum_{=1}^{n} |y_i - \\hat{y}_i|$$Mean Squared Error (MSE): $$MSE = \\frac{1}{n} \\sum_{=1}^{n} (y_i - \\hat{y}_i)^2$$Root Mean Squared Error (RMSE): $$RMSE = \\sqrt{\\frac{1}{n} \\sum_{=1}^{n} (y_i - \\hat{y}_i)^2}$$Coefficient Determination (R-squared): $$R^2 = 1 - \\frac{\\sum_{=1}^{n} (y_i - \\hat{y}_i)^2}{\\sum_{=1}^{n} (y_i - \\bar{y})^2}$$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Metrics for modeler_HTP — metrics_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) x <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(1:2)) plot(x, c(1:2)) print(x) #> #> Call: #> fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.4489 2.0903 3.7317 3.7317 5.3731 7.0145 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc dt slope #> 1 W17037-24 38.6 61.0 0.449 99.8 5807 22.4 4.45 #> 2 W17066-22 35.2 60.7 7.014 100.0 6004 25.6 3.91 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.7401 secs 100% 290.5 (plot) #> metrics_HTP(x) #> # A tibble: 2 × 11 #> plot row range genotype trait SSE MAE MSE RMSE r_squared n #> #> 1 1 1 1 W17037-24 Canopy 0.449 0.0744 0.0499 0.223 1.00 9 #> 2 2 2 1 W17066-22 Canopy 7.01 0.468 0.779 0.883 1.00 9"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Modeler HTP — modeler_HTP","title":"Modeler HTP — modeler_HTP","text":"Modeler HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modeler HTP — modeler_HTP","text":"","code":"modeler_HTP( x, index = \"GLI\", plot_id = NULL, check_negative = TRUE, add_zero = TRUE, max_as_last = FALSE, method = c(\"subplex\", \"pracmanm\", \"anms\"), return_method = FALSE, parameters = NULL, lower = -Inf, upper = Inf, initial_vals = NULL, fixed_params = NULL, fn = \"fn_piwise\", metric = \"sse\", n_points = 1000, max_time = NULL )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modeler HTP — modeler_HTP","text":"x object class read_HTP, containing results read_HTP() function. index string specifying trait modeled. Default \"GLI\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. check_negative Logical. Convert negative values zero. TRUE default. add_zero TRUE FALSE. Add zero time series.TRUE default. max_as_last Logical. TRUE, adds maximum value reaching local maximum. Default FALSE. method vector methods used, character string. See optimx package. c(\"subplex\", \"pracmanm\", \"anms\") default. return_method TRUE FALSE. return method selected optimization table. FALSE default. parameters named vector specifying initial values parameters optimized. c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01) default plots. lower Bounds variables methods \"L-BFGS-B\" can handle box (bounds) constraints. upper Bounds variables methods \"L-BFGS-B\" can handle box (bounds) constraints. initial_vals data.frame columns . Specific initial values per plot. fixed_params data.frame columns . fn String character name function \"fn_lin_pl_lin\". metric character string specifying metric minimize. Can \"sse\", \"mae\", \"mse\" \"rmse\". Default \"sse\". n_points Number time points approximate Area Curve (AUC). 1000 default. max_time Maximum time value calculating AUC. NULL default takes last time point.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modeler HTP — modeler_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame data used. fn call used calculate AUC. max_time Maximum time value used calculating AUC. metrics Metrics summary models. execution Execution time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modeler HTP — modeler_HTP","text":"","code":"library(exploreHTP) suppressMessages(library(dplyr)) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) mat <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195), parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin\", ) plot(mat, plot_id = c(195)) print(mat) #> #> Call: #> fn_lin_pl_lin(time, t1, t2, t3, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.024e-05 1.024e-05 1.024e-05 1.024e-05 1.024e-05 1.024e-05 #> #> Optimization Results `head()`: #> plot genotype t1 t2 t3 k beta sse auc #> 195 W16219-8 39.6 68.3 93.3 0.323 -0.01 1.02e-05 16.4 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.8491 secs 100% 896 (plot) #> can <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", max_as_last = TRUE ) plot(can, plot_id = c(195)) print(can) #> #> Call: #> fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.877e-18 1.877e-18 1.877e-18 1.877e-18 1.877e-18 1.877e-18 #> #> Optimization Results `head()`: #> plot genotype t1 t2 k sse auc #> 195 W16219-8 38.7 62 100 1.88e-18 5765 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.5214 secs 100% 349 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class canopyHTP — plot.canopyHTP","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"Create several plots object class canopyHTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"","code":"# S3 method for canopyHTP plot(x, plot_id = NULL, label_size = 3, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"x object inheriting class canopyHTP resulting executing function canopy_model() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) print(results) #> $summ_traits #> # A tibble: 16 × 12 #> trait time Min Mean Median Max SD CV n #> #> 1 Canopy 29 0 0 0 0 0 NaN 196 #> 2 Canopy 36 0 2.86 1.77 14.5 3.12 1.09 196 #> 3 Canopy 42 0.731 22.7 22.3 44.1 9.00 0.397 196 #> 4 Canopy 56 32.8 74.0 73.7 99.2 12.2 0.165 196 #> 5 Canopy 76 89.6 99.7 100 100 1.05 0.0105 196 #> 6 Canopy 92 63.1 97.1 98.5 100. 4.24 0.0436 196 #> 7 Canopy 100 27.6 82.7 87.5 99.7 14.8 0.179 196 #> 8 Canopy 108 5.15 68.8 74.4 99.1 21.0 0.305 196 #> 9 PH 29 Inf NaN NA -Inf NA NA 0 #> 10 PH 36 -0.0107 0.0232 0.0236 0.0513 0.00877 0.377 176 #> 11 PH 42 -0.0350 0.0719 0.0730 0.205 0.0452 0.629 196 #> 12 PH 56 -0.122 0.0353 0.0218 0.346 0.0802 2.27 196 #> 13 PH 76 0.352 0.563 0.564 0.756 0.0759 0.135 196 #> 14 PH 92 0.220 0.359 0.353 0.527 0.0557 0.155 196 #> 15 PH 100 0.0510 0.234 0.235 0.413 0.0765 0.327 196 #> 16 PH 108 0.261 0.724 0.757 0.988 0.170 0.235 196 #> # ℹ 3 more variables: n_miss , miss_perc , neg_prop #> #> $exp_design_resum #> # A tibble: 1 × 6 #> n n_gen n_row n_range num_of_reps num_of_gen #> #> 1 196 185 14 14 1_2 174_11 #> #> $locals_min_max #> # A tibble: 2 × 3 #> trait local_min_at local_max_at #> #> 1 Canopy \"\" 76 #> 2 PH \"56_100\" 42_76 #> #> $dt_long #> # A tibble: 3,136 × 7 #> time plot row range genotype trait value #> #> 1 29 1 1 1 W17037-24 Canopy 0 #> 2 29 1 1 1 W17037-24 PH NA #> 3 36 1 1 1 W17037-24 Canopy 0.648 #> 4 36 1 1 1 W17037-24 PH 0.0154 #> 5 42 1 1 1 W17037-24 Canopy 14.4 #> 6 42 1 1 1 W17037-24 PH 0.0173 #> 7 56 1 1 1 W17037-24 Canopy 74.5 #> 8 56 1 1 1 W17037-24 PH 0.0941 #> 9 76 1 1 1 W17037-24 Canopy 99.7 #> 10 76 1 1 1 W17037-24 PH 0.456 #> # ℹ 3,126 more rows #> out <- canopy_model(results, plot_id = 22) plot(out)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class canopy_HTP — plot.canopy_HTP","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"Create several plots object class canopy_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"","code":"# S3 method for canopy_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"x object inheriting class canopy_HTP resulting executing function canopy_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Numeric. Size labels plot. Default 4. base_size Base font size, given pts. Default 14. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" out <- canopy_HTP( results = results, canopy = \"Canopy\", plot_id = c(22, 40), correct_max = TRUE, add_zero = TRUE ) names(out) #> [1] \"param\" \"dt\" \"fn\" \"max_time\" plot(out, c(22, 40)) out$param$deltaT <- out$param$t2 - out$param$t1 out$param$slope <- out$param$k / out$param$deltaT out$param #> # A tibble: 2 × 11 #> plot genotype row range t1 t2 k sse total_area deltaT slope #> #> 1 22 W17047-5 8 2 39.5 74.6 98.8 0.297 5034. 35.1 2.81 #> 2 40 W17043-37 12 3 34.8 60.8 100 0.00148 6017. 26.0 3.84"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class height_HTP — plot.height_HTP","title":"Plot an object of class height_HTP — plot.height_HTP","text":"Create several plots object class height_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class height_HTP — plot.height_HTP","text":"","code":"# S3 method for height_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class height_HTP — plot.height_HTP","text":"x object inheriting class height_HTP resulting executing function height_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. base_size Base font size, given pts. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class height_HTP — plot.height_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class height_HTP — plot.height_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class height_HTP — plot.height_HTP","text":"","code":"library(exploreHTP) data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" out <- canopy_HTP( results = results, canopy = \"Canopy\", plot_id = c(60, 150), correct_max = TRUE, add_zero = TRUE ) names(out) #> [1] \"param\" \"dt\" \"fn\" \"max_time\" plot(out, plot_id = c(60, 150)) ph_1 <- height_HTP( results = results, canopy = out, plant_height = \"PH\", add_zero = TRUE, method = c(\"nlminb\", \"anms\", \"mla\", \"pracmanm\", \"subplex\"), return_method = TRUE, parameters = c(t2 = 67, alpha = 1 / 600, beta = -1 / 80), fn_sse = sse_exp2_exp, fn = quote(fn_exp2_exp(time, t1, t2, alpha, beta)) ) plot(x = ph_1, plot_id = c(60, 150)) ph_1$param #> # A tibble: 2 × 11 #> plot genotype row range t2 alpha beta t1 method sse #> #> 1 60 W19026-15 4 5 62 0.00117 -0.0346 38.0 subplex 0.00948 #> 2 150 W19023-21 10 11 62 0.000783 -0.0183 33.8 subplex 0.00143 #> # ℹ 1 more variable: total_area ph_2 <- height_HTP( results = results, canopy = out, plant_height = \"PH\", add_zero = TRUE, method = c(\"nlminb\", \"anms\", \"mla\", \"pracmanm\", \"subplex\"), return_method = TRUE, parameters = c(t2 = 67, alpha = 1 / 600, beta = -1 / 80), fn_sse = sse_exp2_lin, fn = quote(fn_exp2_lin(time, t1, t2, alpha, beta)) ) plot(x = ph_2, plot_id = c(60, 150)) ph_2$param #> # A tibble: 2 × 11 #> plot genotype row range t2 alpha beta t1 method sse #> #> 1 60 W19026-15 4 5 62 0.00110 -0.0166 38.0 subplex 0.0323 #> 2 150 W19023-21 10 11 62 0.000767 -0.0110 33.8 subplex 0.00329 #> # ℹ 1 more variable: total_area "},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class maturity_HTP — plot.maturity_HTP","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"Create several plots object class maturity_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"","code":"# S3 method for maturity_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"x object inheriting class maturity_HTP resulting executing function maturity_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. base_size Base font size, given pts. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" out <- canopy_HTP( results = results, canopy = \"Canopy\", plot_id = c(195, 40), correct_max = TRUE, add_zero = TRUE ) mat <- maturity_HTP( results = results, canopy = out, index = \"GLI_2\", parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn_sse = sse_lin_pl_lin, fn = quote(fn_lin_pl_lin(time, t1, t2, t3, k, beta)) ) plot(mat, plot_id = c(195, 40)) mat$param #> # A tibble: 2 × 11 #> plot genotype row range t1 t2 t3 k beta sse total_area #> #> 1 40 W17043-37 12 3 36.9 66.4 79.9 0.369 -0.0106 6.77e-4 16.6 #> 2 195 W16219-8 13 14 39.6 68.3 93.3 0.323 -0.0100 1.02e-5 16.4"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class modeler_HTP — plot.modeler_HTP","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"Create several plots object class modeler_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"","code":"# S3 method for modeler_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"x object inheriting class modeler_HTP resulting executing function modeler_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. base_size Base font size, given pts. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"","code":"library(exploreHTP) suppressMessages(library(dplyr)) data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" mat <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin\", ) plot(mat, plot_id = c(195, 40)) mat #> #> Call: #> fn_lin_pl_lin(time, t1, t2, t3, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 #> #> Optimization Results `head()`: #> plot genotype t1 t2 t3 k beta sse auc #> 40 W17043-37 36.9 66.4 79.9 0.369 -0.0106 6.77e-04 16.6 #> 195 W16219-8 39.6 68.3 93.3 0.323 -0.0100 1.02e-05 16.4 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 1.6456 secs 100% 1122.5 (plot) #> can <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\" ) plot(can, plot_id = c(195, 40)) can #> #> Call: #> fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 390.5 1004.2 1618.0 1618.0 2231.8 2845.5 #> #> Optimization Results `head()`: #> plot genotype t1 t2 k sse auc #> 40 W17043-37 34.8 53.7 72.5 2846 4623 #> 195 W16219-8 38.7 60.0 91.7 390 5377 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.8727 secs 100% 547 (plot) #> fixed_params <- results$dt_long |> filter(trait %in% \"Canopy\") |> group_by(plot, genotype) |> summarise(k = max(value, na.rm = TRUE), .groups = \"drop\") can <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params ) plot(can, plot_id = c(195, 40)) can #> #> Call: #> fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 663 2064 3466 3466 4867 6268 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc #> 40 W17043-37 34.8 60.8 6268 100 6017 #> 195 W16219-8 38.7 62.0 663 100 5765 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.7646 secs 100% 312.5 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an Object of Class read_HTP — plot.read_HTP","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"Creates various plots object class read_HTP. Depending specified type, function can generate plots show correlations traits time, correlations time points trait, evolution traits time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"","code":"# S3 method for read_HTP plot( x, type = \"trait_by_time\", label_size = 4, signif = FALSE, method = \"pearson\", filter_trait = NULL, n_row = NULL, n_col = NULL, base_size = 13, return_gg = FALSE, ... )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"x object inheriting class read_HTP, resulting executing function read_HTP(). type Character string specifying type plot generate. Available options : \"trait_by_time\" Plots correlations traits time (default). \"time_by_trait\" Plots correlations time points trait. \"evolution\" Plots evolution traits time. label_size Numeric. Size labels plot. Default 4. signif Logical. TRUE, adds p-values correlation plot labels. Default FALSE. method Character string specifying method correlation calculation. Available options \"pearson\" (default), \"spearman\", \"kendall\". filter_trait Character vector specifying traits exclude plot. n_row Integer specifying number rows use facet_wrap(). Default NULL. n_col Integer specifying number columns use facet_wrap(). Default NULL. base_size Numeric. Base font size plot. Default 13. return_gg Logical. TRUE, returns ggplot object instead printing . Default FALSE. ... graphical parameters future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"ggplot object invisible data.frame containing correlation table type \"trait_by_time\" \"time_by_trait\".","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) table <- plot(results, label_size = 4, signif = TRUE, n_row = 2) table #> # A tibble: 7 × 7 #> time col row corr p.value n signi #> #> 1 36 Canopy PH 0.46 8.23e-11 176 *** #> 2 42 Canopy PH 0.67 8.55e-27 196 *** #> 3 56 Canopy PH -0.21 3.65e- 3 196 ** #> 4 76 Canopy PH 0.3 1.41e- 5 196 *** #> 5 92 Canopy PH 0.28 5.96e- 5 196 *** #> 6 100 Canopy PH 0.32 6.45e- 6 196 *** #> 7 108 Canopy PH 0.07 3.14e- 1 196 ns plot(results, type = \"time_by_trait\", label_size = 4, signif = TRUE)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Function — plot_fn","title":"Plot Function — plot_fn","text":"function plots user-defined function specified interval annotates plot calculated Area Curve (AUC) parameter values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Function — plot_fn","text":"","code":"plot_fn( fn = \"fn_piwise\", params = c(t1 = 34.9, t2 = 61.8, k = 100), interval = c(0, 100), n_points = 1000, x_auc_label = NULL, y_auc_label = NULL, auc_label_size = 4, param_label_size = 4, base_size = 12, color = \"red\" )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Function — plot_fn","text":"fn character string representing name function plotted. Default \"fn_piwise\". params named numeric vector parameters passed function. Default c(t1 = 34.9, t2 = 61.8, k = 100). interval numeric vector length 2 specifying interval function plotted. Default c(0, 100). n_points integer specifying number points used plotting. Default 1000. x_auc_label numeric value specifying x-coordinate AUC label. Default NULL. y_auc_label numeric value specifying y-coordinate AUC label. Default NULL. auc_label_size numeric value specifying size AUC label text. Default 3. param_label_size numeric value specifying size parameter label text. Default 3. base_size numeric value specifying base size plot's theme. Default 12. color character string specifying color plot lines area fill. Default \"red\".","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Function — plot_fn","text":"ggplot object representing plot.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Function — plot_fn","text":"","code":"# Example usage plot_fn( fn = \"fn_piwise\", params = c(t1 = 34.9, t2 = 61.8, k = 100), interval = c(0, 100), n_points = 1000 ) plot_fn( fn = \"fn_lin_pl_lin\", params <- c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), interval = c(0, 100), n_points = 1000, base_size = 12 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Print an object of class modeler_HTP — print.modeler_HTP","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"Prints information modeler_HTP function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"","code":"# S3 method for modeler_HTP print(x, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"x object fitted function modeler_HTP(). ... Options used tibble package format output. See `tibble::print()` details.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"object inheriting class modeler_HTP.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"","code":"library(exploreHTP) data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) out <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(1:11)) plot(out, plot_id = c(1:11)) print(out) #> #> Call: #> fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error `scale()`: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> -0.6387 -0.6232 -0.5200 0.0000 0.3479 2.5892 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc dt slope #> 1 W17037-24 38.6 61.0 4.49e-01 99.8 5807 22.4 4.45 #> 2 W17066-22 35.2 60.7 7.01e+00 100.0 6004 25.6 3.91 #> 3 W16091-5 33.8 59.9 4.26e+00 100.0 6119 26.1 3.83 #> 4 W17037-26 39.3 65.5 2.58e-26 99.8 5551 26.1 3.82 #> #> Metrics: #> Plots Timing Convergence Iterations #> 11 4.3007 secs 100% 315.09 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Read HTP Data — read_HTP","title":"Read HTP Data — read_HTP","text":"Reads processes high-throughput phenotyping (HTP) data data frame wide format.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read HTP Data — read_HTP","text":"","code":"read_HTP(data, genotype, time, plot, traits, row, range)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read HTP Data — read_HTP","text":"data data.frame wide format containing HTP data. genotype character string indicating column `data` contains genotype information. time character string indicating column `data` contains time points. plot character string indicating column `data` contains plot IDs. traits character vector specifying columns `data` contain traits analyzed. row character string indicating column `data` contains row coordinates. range character string indicating column `data` contains range coordinates.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read HTP Data — read_HTP","text":"object class read_HTP, list containing following elements: summ_traits data.frame containing summary statistics trait time point, including minimum, mean, median, maximum, standard deviation, coefficient variation, number non-missing values, percentage missing values, percentage negative values. exp_design_resum data.frame summarizing experimental design, including number unique genotypes, rows, ranges, replication structure. locals_min_max data.frame containing local minima maxima mean trait values time. dt_long data.frame long format, columns time, plot, row, range, genotype, trait, value.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read HTP Data — read_HTP","text":"function processes prepares HTP data analyzed.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read HTP Data — read_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" head(results$summ_traits) #> # A tibble: 6 × 12 #> trait time Min Mean Median Max SD CV n miss `miss%` #> #> 1 Canopy 29 0 0 0 0 0 NaN 196 0 0 #> 2 Canopy 36 0 2.95 1.84 15.1 3.22 1.09 196 0 0 #> 3 Canopy 42 0.763 23.4 22.9 46.2 9.31 0.398 196 0 0 #> 4 Canopy 56 33.4 75.8 75.2 98.9 12.4 0.164 196 0 0 #> 5 Canopy 76 89.1 99.7 100 100 1.04 0.0104 196 0 0 #> 6 Canopy 92 62.5 97.0 98.4 100. 4.36 0.0449 196 0 0 #> # ℹ 1 more variable: `neg%` plot(results, label_size = 4, signif = TRUE, n_row = 2) # New data format head(results$dt_long) #> # A tibble: 6 × 7 #> time plot row range genotype trait value #> #> 1 29 1 1 1 W17037-24 Canopy 0 #> 2 29 1 1 1 W17037-24 PH NA #> 3 36 1 1 1 W17037-24 Canopy 0.67 #> 4 36 1 1 1 W17037-24 PH 0.0154 #> 5 42 1 1 1 W17037-24 Canopy 15.1 #> 6 42 1 1 1 W17037-24 PH 0.0173"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function — sse","title":"Sum of Squares Error Function — sse","text":"Function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function — sse","text":"","code":"sse(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function — sse","text":"params Numeric vector two parameters. t Independent variable. y Response variable.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function — sse","text":"sum squares error","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function — sse","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) sse(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp1_exp function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"","code":"sse_exp1_exp(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"params Numeric vector. parameters fn_exp1_exp function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp1_exp(params, t, y, t1) # Should return the SSE value #> [1] 639.3013"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp1_lin function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"","code":"sse_exp1_lin(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"params Numeric vector. parameters fn_exp1_lin function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp1_lin(params, t, y, t1) # Should return the SSE value #> [1] 698.4337"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp2_exp function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"","code":"sse_exp2_exp(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"params Numeric vector. parameters fn_exp2_exp function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp2_exp(params, t, y, t1) # Should return the SSE value #> [1] 2.708789e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp2_lin function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"","code":"sse_exp2_lin(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"params Numeric vector. parameters fn_exp2_lin function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp2_lin(params, t, y, t1) # Should return the SSE value #> [1] 2.978768e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_lin_pl_lin function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"","code":"sse_lin_pl_lin(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"params Numeric vector. parameters fn_lin_pl_lin function, params[1] t1, params[2] t2, params[3] t3 params[4] k params[5] beta. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 0, 0.027, 0.185, 0.325, 0.321, 0.256, 0.176) sse_lin_pl_lin( params = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), t = x, y = y ) #> [1] 0.00616009 y_hat <- sapply( X = x, FUN = fn_lin_pl_lin, t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01 ) sum((y - y_hat)^2) #> [1] 0.00616009"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"Calculates sum squared errors (SSE) observed values values predicted fn_lin_pl_lin2 function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"","code":"sse_lin_pl_lin2(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"params Numeric vector. parameters fn_lin_pl_lin2 function, params[1] t1, params[2] t2, params[3] t3 params[4] k params[5] beta. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 0, 0.027, 0.185, 0.325, 0.321, 0.256, 0.176) sse_lin_pl_lin2( params = c(t1 = 38.7, dt = 28, t3 = 90, k = 0.32, beta = -0.01), t = x, y = y ) #> [1] 0.00616009 y_hat <- sapply( X = x, FUN = fn_lin_pl_lin2, t1 = 38.7, dt = 28, t3 = 90, k = 0.32, beta = -0.01 ) sum((y - y_hat)^2) #> [1] 0.00616009"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"Calculates sum squared errors (SSE) observed values values predicted fn_lin_pl_lin3 function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"","code":"sse_lin_pl_lin3(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"params Numeric vector. parameters fn_lin_pl_lin3 function, params[1] t1, params[2] t2, params[3] t3 params[4] k params[5] beta. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 0, 0.027, 0.185, 0.325, 0.321, 0.256, 0.176) sse_lin_pl_lin3( params = c(t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01), t = x, y = y ) #> [1] 0.00616009 y_hat <- sapply( X = x, FUN = fn_lin_pl_lin3, t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01 ) sum((y - y_hat)^2) #> [1] 0.00616009"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Piecewise Model — sse_piwise","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"Calculates sum squared errors (SSE) observed values values predicted fn_piwise function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"","code":"sse_piwise(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"params Numeric vector. parameters fn_piwise function, params[1] t1 params[2] t2. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) sse_piwise(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_piwise, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/news/index.html","id":"explorehtp-010","dir":"Changelog","previous_headings":"","what":"exploreHTP 0.1.0","title":"exploreHTP 0.1.0","text":"Initial CRAN submission.","code":""}] +[{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"loading-libraries","dir":"Articles","previous_headings":"","what":"Loading libraries","title":"Modelling Emergence and Maximun Canopy","text":"","code":"library(exploreHTP) library(dplyr) library(kableExtra) library(ggpubr) library(purrr)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"reading-data-read_htp","dir":"Articles","previous_headings":"","what":"Reading data read_HTP()","title":"Modelling Emergence and Maximun Canopy","text":"","code":"data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = \"Canopy\", row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"data-exploration","dir":"Articles","previous_headings":"","what":"Data exploration","title":"Modelling Emergence and Maximun Canopy","text":"","code":"p1 <- plot(results, type = \"evolution\", return_gg = TRUE) p2 <- plot(results, type = \"time_by_trait\", return_gg = TRUE) ggarrange(p1, p2)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"target-function","dir":"Articles","previous_headings":"","what":"Target Function","title":"Modelling Emergence and Maximun Canopy","text":"fn_piwise() \\[\\begin{equation} f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"fitting-models","dir":"Articles","previous_headings":"","what":"Fitting Models","title":"Modelling Emergence and Maximun Canopy","text":"","code":"mod_1 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\" ) plot(mod_1, plot_id = c(195, 40)) kable(mod_1$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"providing-different-initial-values","dir":"Articles","previous_headings":"","what":"Providing different initial values","title":"Modelling Emergence and Maximun Canopy","text":"","code":"initials <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") |> mutate(t1 = c(40, 60), t2 = c(70, 80), .before = k) kable(initials) mod_2 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", initial_vals = initials ) plot(mod_2, plot_id = c(195, 40)) kable(mod_2$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"fixing-some-parameters-of-the-model","dir":"Articles","previous_headings":"","what":"Fixing some parameters of the model","title":"Modelling Emergence and Maximun Canopy","text":"","code":"fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") kable(fixed_params) mod_3 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params ) plot(mod_3, plot_id = c(195, 40)) kable(mod_3$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"correcting-maximun-value","dir":"Articles","previous_headings":"","what":"Correcting Maximun value","title":"Modelling Emergence and Maximun Canopy","text":"","code":"mod_4 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) plot(mod_4, plot_id = c(195, 40)) kable(mod_4$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"comparing-models","dir":"Articles","previous_headings":"","what":"Comparing Models","title":"Modelling Emergence and Maximun Canopy","text":"","code":"rbind.data.frame( mutate(mod_1$param, mod = \"1\"), mutate(mod_2$param, mod = \"2\"), mutate(mod_3$param, mod = \"3\"), mutate(mod_4$param, mod = \"4\") ) |> filter(plot %in% 40) |> kable()"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/canopy-model.html","id":"code","dir":"Articles","previous_headings":"","what":"Code","title":"Modelling Emergence and Maximun Canopy","text":"","code":"results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = \"Canopy\", row = \"Row\", range = \"Range\" ) fixed_params <- results$dt_long |> filter(trait %in% \"Canopy\") |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod <- modeler_HTP( x = results, index = \"Canopy\", plot_id = NULL, parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE )"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"loading-libraries","dir":"Articles","previous_headings":"","what":"Loading libraries","title":"Modelling Plant Height","text":"","code":"library(exploreHTP) library(dplyr) library(kableExtra) library(ggpubr) library(purrr)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"reading-data-read_htp","dir":"Articles","previous_headings":"","what":"Reading data read_HTP()","title":"Modelling Plant Height","text":"","code":"data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"PH\", \"Canopy\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"data-exploration","dir":"Articles","previous_headings":"","what":"Data exploration","title":"Modelling Plant Height","text":"","code":"p1 <- plot(results, type = \"evolution\", return_gg = TRUE) p2 <- plot(results, type = \"time_by_trait\", return_gg = TRUE) ggarrange(p1, p2, nrow = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"estimating-days-to-emergence","dir":"Articles","previous_headings":"","what":"Estimating days to emergence","title":"Modelling Plant Height","text":"\\[\\begin{equation} f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"fitting-models-for-canopy","dir":"Articles","previous_headings":"","what":"Fitting models for canopy","title":"Modelling Plant Height","text":"","code":"fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod_1 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) plot(mod_1, plot_id = c(195, 40)) kable(mod_1$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"target-function-for-plant-height","dir":"Articles","previous_headings":"","what":"Target function for plant height","title":"Modelling Plant Height","text":"fn_exp2_exp() \\[\\begin{equation} f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"fixing-parameters-and-providing-initial-values","dir":"Articles","previous_headings":"","what":"Fixing parameters and providing initial values","title":"Modelling Plant Height","text":"","code":"fixed_params <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1) kable(fixed_params) initials <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1, t2) |> mutate(alpha = 1 / 600, beta = -1 / 30) kable(initials)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"fitting-models-for-plant-height","dir":"Articles","previous_headings":"","what":"Fitting models for plant height","title":"Modelling Plant Height","text":"Using t1 previous model fixed parameter using t2 initial parameter per plot.","code":"mod_2 <- modeler_HTP( x = results, index = \"PH\", plot_id = c(195, 40), fn = \"fn_exp2_exp\", initial_vals = initials, fixed_params = fixed_params ) plot(mod_2, plot_id = c(195, 40)) kable(mod_2$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/height-model.html","id":"code","dir":"Articles","previous_headings":"","what":"Code","title":"Modelling Plant Height","text":"","code":"data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"PH\", \"Canopy\"), row = \"Row\", range = \"Range\" ) fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod_1 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) fixed_params <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1) initials <- mod_1 |> pluck(\"param\") |> select(plot, genotype, t1, t2) |> mutate(alpha = 1 / 600, beta = -1 / 30) mod_2 <- modeler_HTP( x = results, index = \"PH\", plot_id = c(195, 40), fn = \"fn_exp2_exp\", initial_vals = initials, fixed_params = fixed_params )"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"loading-libraries","dir":"Articles","previous_headings":"","what":"Loading libraries","title":"Modelling Maturity","text":"","code":"library(exploreHTP) library(dplyr) library(kableExtra) library(ggpubr) library(purrr)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"reading-data-read_htp","dir":"Articles","previous_headings":"","what":"Reading data read_HTP()","title":"Modelling Maturity","text":"","code":"data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"data-exploration","dir":"Articles","previous_headings":"","what":"Data exploration","title":"Modelling Maturity","text":"","code":"p1 <- plot(results, type = \"evolution\", return_gg = TRUE) p2 <- plot(results, type = \"time_by_trait\", return_gg = TRUE) ggarrange(p1, p2, nrow = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"target-function-for-maturity","dir":"Articles","previous_headings":"","what":"Target function for maturity","title":"Modelling Maturity","text":"fn_lin_pl_lin() \\[\\begin{equation} f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} \\end{equation}\\]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"fitting-models-for-maturity","dir":"Articles","previous_headings":"","what":"Fitting models for maturity","title":"Modelling Maturity","text":"","code":"mod_1 <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin\", ) plot(mod_1, plot_id = c(195, 40)) kable(mod_1$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"providing-initial-parameters-from-the-canopy-model","dir":"Articles","previous_headings":"","what":"Providing initial parameters from the canopy model","title":"Modelling Maturity","text":"","code":"fixed_params <- results |> pluck(\"dt_long\") |> filter(trait %in% \"Canopy\" & plot %in% c(195, 40)) |> group_by(plot, genotype) |> summarise(k = max(value), .groups = \"drop\") mod_2 <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params, max_as_last = TRUE ) plot(mod_2, plot_id = c(195, 40)) kable(mod_2$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"passing-initial-values","dir":"Articles","previous_headings":"","what":"Passing initial values","title":"Modelling Maturity","text":"","code":"initials <- mod_2 |> pluck(\"param\") |> select(plot, genotype, t1, t2) |> mutate(t3 = 100, k = 0.32, beta = -0.01) kable(initials) mod_3 <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), initial_vals = initials, fn = \"fn_lin_pl_lin\", ) plot(mod_3, plot_id = c(195, 40)) kable(mod_3$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/articles/maturity-model.html","id":"adding-constrains-to-the-optimization","dir":"Articles","previous_headings":"","what":"Adding constrains to the optimization","title":"Modelling Maturity","text":"","code":"mod_4 <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), parameters = c(t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin2\", method = c(\"nlminb\", \"L-BFGS-B\"), lower = c(-Inf, -Inf, 0, -Inf, -Inf), upper = c(Inf, Inf, Inf, Inf, 0), ) plot(mod_4, plot_id = c(195, 40)) kable(mod_4$param)"},{"path":"https://apariciojohan.github.io/exploreHTP/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Johan Aparicio. Author, maintainer. Jeffrey Endelman. Contributor. University Wisconsin Madison. Copyright holder.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Aparicio J (2024). exploreHTP: Explore High-Throughput Phenotypic (HTP) Data. R package version 0.1.0, https://github.com/AparicioJohan/exploreHTP, https://apariciojohan.github.io/exploreHTP/.","code":"@Manual{, title = {exploreHTP: Explore High-Throughput Phenotypic (HTP) Data}, author = {Johan Aparicio}, year = {2024}, note = {R package version 0.1.0, https://github.com/AparicioJohan/exploreHTP}, url = {https://apariciojohan.github.io/exploreHTP/}, }"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"explorehtp-","dir":"","previous_headings":"","what":"Explore High-Throughput Phenotypic (HTP) Data","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"exploreHTP designed assist researchers plant breeders efficiently exploring analyzing data derived drone imagery. package offers suite tools tailored unique needs plant breeding data, facilitating comprehensive data exploration, correlation analysis, data manipulation, flexible data modeling.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"can install development version exploreHTP GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"AparicioJohan/exploreHTP\")"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_1-reading-data","dir":"","previous_headings":"","what":"1. Reading Data","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"basic example shows use exploreHTP:","code":"library(exploreHTP) data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" plot(results, type = \"evolution\") head(results$summ_traits)"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_2-plotting-correlations-1","dir":"","previous_headings":"","what":"2. Plotting correlations (1)","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"# Trait by Time table <- plot(results, label_size = 4, signif = TRUE, n_row = 1) head(table)"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_3-plotting-correlations-2","dir":"","previous_headings":"","what":"3. Plotting correlations (2)","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"# Time by Trait table <- plot(results, type = \"time_by_trait\", label_size = 4, signif = TRUE) head(table)"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_4-estimating-days-to-emergence-and-days-to-full-canopy","dir":"","previous_headings":"","what":"4. Estimating days to emergence and days to full canopy","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"out <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(60, 150)) print(out) Call: Canopy ~ fn_piwise(time, t1, t2, k) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. 4.894 13.772 22.650 22.650 31.528 40.406 Optimization Results `head()`: plot genotype t1 t2 sse k auc dt slope 60 W19026-15 38.0 68.7 4.89 100 5162 30.6 3.26 150 W19023-21 33.8 68.5 40.41 100 5386 34.7 2.88 Metrics: Plots Timing Convergence Iterations 2 0.608 secs 100% 273.5 (plot) plot(out, plot_id = c(60, 150))"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_5-modelling-plant-height","dir":"","previous_headings":"","what":"5. Modelling Plant Height","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"ph_1 <- height_HTP( x = results, height = \"PH\", canopy = \"Canopy\", plot_id = c(60, 150), fn = \"fn_exp2_exp\" ) print(ph_1) Call: PH ~ fn_exp2_exp(time, t1, t2, alpha, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. 0.001433 0.003388 0.005343 0.005343 0.007298 0.009253 Optimization Results `head()`: plot genotype t2 alpha beta sse t1 auc 60 W19026-15 62 0.001168 -0.0346 0.00925 38.0 28.0 150 W19023-21 62 0.000783 -0.0183 0.00143 33.8 32.9 Metrics: Plots Timing Convergence Iterations 2 0.7976 secs 100% 964.5 (plot) plot(ph_1, plot_id = c(60, 150))"},{"path":"https://apariciojohan.github.io/exploreHTP/index.html","id":"id_6-modelling-maturity","dir":"","previous_headings":"","what":"6. Modelling Maturity","title":"Explore High-Throughput Phenotypic (HTP) Data","text":"","code":"data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) mat <- maturity_HTP( x = results, index = \"GLI_2\", canopy = \"Canopy\", plot_id = c(195, 40) ) print(mat) Call: GLI_2 ~ fn_lin_pl_lin2(time, t1, t2, dt, k, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. 1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 Optimization Results `head()`: plot genotype t1 t2 dt k beta sse auc t3 40 W17043-37 36.9 66.4 13.4 0.369 -0.0106 6.77e-04 16.6 79.9 195 W16219-8 39.6 68.3 25.1 0.323 -0.0100 1.02e-05 16.4 93.3 Metrics: Plots Timing Convergence Iterations 2 0.6441 secs 100% 341 (plot) plot(mat, plot_id = c(195, 40))"},{"path":"https://apariciojohan.github.io/exploreHTP/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 exploreHTP authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Canopy Modelling — canopy_HTP","title":"Canopy Modelling — canopy_HTP","text":"function performs canopy modelling based time series data high-throughput phenotyping (HTP). optimizes parameters fit specified function canopy data time, potentially correcting maximum values adding zero point series.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canopy Modelling — canopy_HTP","text":"","code":"canopy_HTP(x, index = \"Canopy\", plot_id = NULL, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canopy Modelling — canopy_HTP","text":"x object class read_HTP, containing results read_HTP() function. index string specifying canopy trait modeled. Default \"Canopy\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. ... Additional arguments passed modeler_HTP() function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canopy Modelling — canopy_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame corrected possibly zero-augmented canopy data. fn call used calculate AUC. max_time Maximum time value used calculating AUC.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canopy Modelling — canopy_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) out <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(22, 40)) plot(out, c(22, 40)) print(out) #> #> Call: #> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.001477 0.075360 0.149243 0.149243 0.223126 0.297009 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc dt slope #> 22 W17047-5 39.5 74.6 0.29701 98.8 5034 35.1 2.81 #> 40 W17043-37 34.8 60.8 0.00148 100.0 6017 26.0 3.84 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.6836 secs 100% 286 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Canopy Modelling — canopy_model","title":"Canopy Modelling — canopy_model","text":"Canopy Modelling","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canopy Modelling — canopy_model","text":"","code":"canopy_model( results, canopy = \"Canopy\", plot_id = NULL, method = FALSE, correct_max = TRUE, add_zero = TRUE )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canopy Modelling — canopy_model","text":"results Object class exploreHTP canopy string plot_id Optional Plot ID. NULL default method TRUE FALSE. see method used optimization table. FALSE default. correct_max Add maximum value reaching local maximum. TRUE default. add_zero TRUE FALSE. Add zero time series.TRUE default.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canopy Modelling — canopy_model","text":"data.frame","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/canopy_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canopy Modelling — canopy_model","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) print(results) #> $summ_traits #> # A tibble: 16 × 12 #> trait time Min Mean Median Max SD CV n #> #> 1 Canopy 29 0 0 0 0 0 NaN 196 #> 2 Canopy 36 0 2.86 1.77 14.5 3.12 1.09 196 #> 3 Canopy 42 0.731 22.7 22.3 44.1 9.00 0.397 196 #> 4 Canopy 56 32.8 74.0 73.7 99.2 12.2 0.165 196 #> 5 Canopy 76 89.6 99.7 100 100 1.05 0.0105 196 #> 6 Canopy 92 63.1 97.1 98.5 100. 4.24 0.0436 196 #> 7 Canopy 100 27.6 82.7 87.5 99.7 14.8 0.179 196 #> 8 Canopy 108 5.15 68.8 74.4 99.1 21.0 0.305 196 #> 9 PH 29 Inf NaN NA -Inf NA NA 0 #> 10 PH 36 -0.0107 0.0232 0.0236 0.0513 0.00877 0.377 176 #> 11 PH 42 -0.0350 0.0719 0.0730 0.205 0.0452 0.629 196 #> 12 PH 56 -0.122 0.0353 0.0218 0.346 0.0802 2.27 196 #> 13 PH 76 0.352 0.563 0.564 0.756 0.0759 0.135 196 #> 14 PH 92 0.220 0.359 0.353 0.527 0.0557 0.155 196 #> 15 PH 100 0.0510 0.234 0.235 0.413 0.0765 0.327 196 #> 16 PH 108 0.261 0.724 0.757 0.988 0.170 0.235 196 #> # ℹ 3 more variables: miss , `miss%` , `neg%` #> #> $exp_design_resum #> # A tibble: 1 × 6 #> n n_gen n_row n_range num_of_reps num_of_gen #> #> 1 196 185 14 14 1_2 174_11 #> #> $locals_min_max #> # A tibble: 2 × 3 #> trait local_min_at local_max_at #> #> 1 Canopy \"\" 76 #> 2 PH \"56_100\" 42_76 #> #> $dt_long #> # A tibble: 3,136 × 7 #> time plot row range genotype trait value #> #> 1 29 1 1 1 W17037-24 Canopy 0 #> 2 29 1 1 1 W17037-24 PH NA #> 3 36 1 1 1 W17037-24 Canopy 0.648 #> 4 36 1 1 1 W17037-24 PH 0.0154 #> 5 42 1 1 1 W17037-24 Canopy 14.4 #> 6 42 1 1 1 W17037-24 PH 0.0173 #> 7 56 1 1 1 W17037-24 Canopy 74.5 #> 8 56 1 1 1 W17037-24 PH 0.0941 #> 9 76 1 1 1 W17037-24 Canopy 99.7 #> 10 76 1 1 1 W17037-24 PH 0.456 #> # ℹ 3,126 more rows #> #> attr(,\"class\") #> [1] \"read_HTP\" out <- canopy_model(results, plot_id = 22)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":null,"dir":"Reference","previous_headings":"","what":"Drone Data in Potato 2022 — dt_chips","title":"Drone Data in Potato 2022 — dt_chips","text":"Vegetative indices biomass related traits potato trial arranged p-rep design.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drone Data in Potato 2022 — dt_chips","text":"","code":"dt_chips"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Drone Data in Potato 2022 — dt_chips","text":"tibble 1568 rows 17 variables: Trial chr trial name DAP dbl denoting Days planting Plot dbl denoting unique plot id Row dbl denoting row coordinate Range dbl denoting range coordinate Gen chr denoting genotype id Yield dbl Total Yield measured end season VineMaturity dbl VineMaturity measure season Red - Canopy dbl denoting drone-derived traits","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_chips.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Drone Data in Potato 2022 — dt_chips","text":"UW - Potato Breeding Program","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":null,"dir":"Reference","previous_headings":"","what":"Drone Data in Potato 2020 — dt_potato","title":"Drone Data in Potato 2020 — dt_potato","text":"Vegetative indices biomass related traits potato trial arranged p-rep design.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drone Data in Potato 2020 — dt_potato","text":"","code":"dt_potato"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Drone Data in Potato 2020 — dt_potato","text":"tibble 1372 rows 17 variables: Trial chr trial name DAP dbl denoting Days planting Plot dbl denoting unique plot id Row dbl denoting row coordinate Range dbl denoting range coordinate Gen chr denoting genotype id Yield dbl Total Yield measured end season VineMaturity dbl VineMaturity measure season Red - Canopy dbl denoting drone-derived traits","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/dt_potato.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Drone Data in Potato 2020 — dt_potato","text":"UW - Potato Breeding Program","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":null,"dir":"Reference","previous_headings":"","what":"Piece-wise Regression — fn_canopy","title":"Piece-wise Regression — fn_canopy","text":"Piece-wise Regression","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Piece-wise Regression — fn_canopy","text":"","code":"fn_canopy(t, t1 = 45, t2 = 80, k = 0.9)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Piece-wise Regression — fn_canopy","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time. Default 80. k Numeric. maximum value function. Default 0.9.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Piece-wise Regression — fn_canopy","text":"numeric value based threshold model. t less t1, function returns 0. t t1 t2 (inclusive), function returns value 0 k linear trend. t greater t2, function returns k.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Piece-wise Regression — fn_canopy","text":"$$ f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_canopy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Piece-wise Regression — fn_canopy","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply(t, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(34.9, 61.8), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Exponential Function 1 — fn_exp1_exp","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"Computes value based exponential growth curve exponential decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"","code":"fn_exp1_exp(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter first exponential term. Must greater 0. beta Numeric. parameter second exponential term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"numeric value based double exponential model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)) - 1. t greater t2, function returns (exp(alpha * (t2 - t1)) - 1) * exp(beta * (t - t2)).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Exponential Function 1 — fn_exp1_exp","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp1_exp\", params = c(t1 = 35, t2 = 55, alpha = 1 / 20, beta = -1 / 30), interval = c(0, 108), n_points = 2000, auc_label_size = 3, y_auc_label = 0.2 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Linear Function 1 — fn_exp1_lin","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"Computes value based exponential growth curve linear decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"","code":"fn_exp1_lin(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter exponential term. Must greater 0. beta Numeric. parameter linear term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"numeric value based exponential linear model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)) - 1. t greater t2, function returns beta * (t - t2) + (exp(alpha * (t2 - t1)) - 1).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\beta \\cdot (t - t_2) + \\left(e^{\\alpha \\cdot (t_2 - t_1)} - 1\\right) & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp1_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Linear Function 1 — fn_exp1_lin","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp1_lin\", params = c(t1 = 35, t2 = 55, alpha = 1 / 20, beta = -1 / 40), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Exponential Function 2 — fn_exp2_exp","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"Computes value based exponential growth curve exponential decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"","code":"fn_exp2_exp(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter first exponential term. Must greater 0. beta Numeric. parameter second exponential term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"numeric value based double exponential model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns (exp(alpha * (t2 - t1)^2) - 1) * exp(beta * (t - t2)).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Exponential Function 2 — fn_exp2_exp","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp2_exp\", params = c(t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 30), interval = c(0, 108), n_points = 2000, auc_label_size = 3, y_auc_label = 0.15 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Linear Function 2 — fn_exp2_lin","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"Computes value based exponential growth curve linear decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"","code":"fn_exp2_lin(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter exponential term. Must greater 0. beta Numeric. parameter linear term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"numeric value based exponential linear model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns beta * (t - t2) + (exp(alpha * (t2 - t1)^2) - 1).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\beta \\cdot (t - t_2) + \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp2_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Linear Function 2 — fn_exp2_lin","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_exp2_lin\", params = c(t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 80), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Exponential Function — fn_exp_exp","title":"Exponential Exponential Function — fn_exp_exp","text":"Computes value based exponential growth curve exponential decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Exponential Function — fn_exp_exp","text":"","code":"fn_exp_exp(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Exponential Function — fn_exp_exp","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter first exponential term. Must greater 0. beta Numeric. parameter second exponential term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Exponential Function — fn_exp_exp","text":"numeric value based double exponential model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns (exp(alpha * (t2 - t1)^2) - 1) * exp(beta * (t - t2)).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Exponential Function — fn_exp_exp","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) \\cdot e^{\\beta \\cdot (t - t_2)} & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Exponential Function — fn_exp_exp","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply( X = t, FUN = fn_exp_exp, t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 30 ) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(35, 55), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":null,"dir":"Reference","previous_headings":"","what":"Exponential Linear Function — fn_exp_linear","title":"Exponential Linear Function — fn_exp_linear","text":"Computes value based exponential growth curve linear decay model time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Exponential Linear Function — fn_exp_linear","text":"","code":"fn_exp_linear(t, t1, t2, alpha, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Exponential Linear Function — fn_exp_linear","text":"t Numeric. time value. t1 Numeric. lower threshold time. Assumed known. t2 Numeric. upper threshold time. alpha Numeric. parameter exponential term. Must greater 0. beta Numeric. parameter linear term. Must less 0.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Exponential Linear Function — fn_exp_linear","text":"numeric value based exponential linear model. t less t1, function returns 0. t t1 t2 (inclusive), function returns exp(alpha * (t - t1)^2) - 1. t greater t2, function returns beta * (t - t2) + (exp(alpha * (t2 - t1)^2) - 1).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Exponential Linear Function — fn_exp_linear","text":"$$ f(t; t_1, t_2, \\alpha, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ e^{\\alpha \\cdot (t - t_1)^2} - 1 & \\text{} t_1 \\leq t \\leq t_2 \\\\ \\beta \\cdot (t - t_2) + \\left(e^{\\alpha \\cdot (t_2 - t_1)^2} - 1\\right) & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_exp_linear.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Exponential Linear Function — fn_exp_linear","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply( X = t, FUN = fn_exp_linear, t1 = 35, t2 = 55, alpha = 1 / 600, beta = -1 / 80 ) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(35, 55), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear — fn_lin_pl_lin","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"Linear Plateau Linear","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"","code":"fn_lin_pl_lin(t, t1, t2, t3, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time plateau. Default 80. t3 Numeric. lower threshold time plateau. Default 45. k Numeric. maximum value function. Default 0.9. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"$$ f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear — fn_lin_pl_lin","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_lin_pl_lin\", params = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"Linear Plateau Linear Constrains","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"","code":"fn_lin_pl_lin2(t, t1, t2, dt, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"t Numeric. time value. t1 Numeric. lower threshold time. t2 Numeric. upper threshold time plateau. dt Numeric. dt = t3 - t2. k Numeric. maximum value function. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"$$ f(t; t_1, t_2, dt, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq (t_2 + dt) \\\\ k + \\beta \\cdot (t - (t_2 + dt)) & \\text{} t > (t_2 + dt) \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear with Constrains — fn_lin_pl_lin2","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_lin_pl_lin2\", params = c(t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"Linear Plateau Linear Constrains","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"","code":"fn_lin_pl_lin3(t, t1, t2, t3, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time plateau. Default 80. t3 Numeric. lower threshold time plateau. Default 45. k Numeric. maximum value function. Default 0.9. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"$$ f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin3","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_lin_pl_lin3\", params = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"Linear Plateau Linear Constrains","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"","code":"fn_lin_pl_lin4(t, t1, t2, t3, k, beta)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time plateau. Default 80. t3 Numeric. lower threshold time plateau. Default 45. k Numeric. maximum value function. Default 0.9. beta Numeric. Slope linear decay.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"numeric value based linear plateau linear model.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"$$ f(t; t_1, t_2, t_3, k, \\beta) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t_2 \\leq t \\leq t_3 \\\\ k + \\beta \\cdot (t - t_3) & \\text{} t > t_3 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_lin_pl_lin4.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Plateau Linear Constrains — fn_lin_pl_lin4","text":"","code":"library(exploreHTP) t <- seq(0, 108, 0.1) y_hat <- sapply( X = t, FUN = fn_lin_pl_lin, t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01 ) plot(t, y_hat, type = \"l\") lines(t, y_hat, col = \"red\") abline(v = c(38.7, 62), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Piecewise Linear Regression — fn_piwise","title":"Piecewise Linear Regression — fn_piwise","text":"Computes value based linear growth curve reaching plateau time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Piecewise Linear Regression — fn_piwise","text":"","code":"fn_piwise(t, t1 = 45, t2 = 80, k = 0.9)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Piecewise Linear Regression — fn_piwise","text":"t Numeric. time value. t1 Numeric. lower threshold time. Default 45. t2 Numeric. upper threshold time. Default 80. k Numeric. maximum value function. Default 0.9. Assumed known.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Piecewise Linear Regression — fn_piwise","text":"numeric value based threshold model. t less t1, function returns 0. t t1 t2 (inclusive), function returns value 0 k linear trend. t greater t2, function returns k.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Piecewise Linear Regression — fn_piwise","text":"$$ f(t; t_1, t_2, k) = \\begin{cases} 0 & \\text{} t < t_1 \\\\ \\dfrac{k}{t_2 - t_1} \\cdot (t - t_1) & \\text{} t_1 \\leq t \\leq t_2 \\\\ k & \\text{} t > t_2 \\end{cases} $$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_piwise.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Piecewise Linear Regression — fn_piwise","text":"","code":"library(exploreHTP) plot_fn( fn = \"fn_piwise\", params = c(t1 = 34.9, t2 = 61.8, k = 100), interval = c(0, 108), n_points = 2000, auc_label_size = 3 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function — fn_sse","title":"Sum of Squares Error Function — fn_sse","text":"Function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function — fn_sse","text":"","code":"fn_sse(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function — fn_sse","text":"params Numeric vector two parameters. t Independent variable. y Response variable.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function — fn_sse","text":"sum squares error","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function — fn_sse","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) fn_sse(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function — fn_sse_can","title":"Sum of Squares Error Function — fn_sse_can","text":"Calculates sum squared errors (SSE) observed values values predicted fn_canopy function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function — fn_sse_can","text":"","code":"fn_sse_can(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function — fn_sse_can","text":"params Numeric vector. parameters fn_canopy function, params[1] t1 params[2] t2. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function — fn_sse_can","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_can.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function — fn_sse_can","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) fn_sse_can(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp_exp function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"","code":"fn_sse_exp(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"params Numeric vector. parameters fn_exp_exp function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Exponential Model — fn_sse_exp","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 fn_sse_exp(params, t, y, t1) # Should return the SSE value #> [1] 2.708789e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp_linear function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"","code":"fn_sse_lin(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"params Numeric vector. parameters fn_exp_linear function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Linear Model — fn_sse_lin","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 fn_sse_lin(params, t, y, t1) # Should return the SSE value #> [1] 2.978768e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"Calculates sum squared errors (SSE) observed values values predicted fn_piwise function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"","code":"fn_sse_piw(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"params Numeric vector. parameters fn_piwise function, params[1] t1 params[2] t2. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fn_sse_piw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Piecewise Model — fn_sse_piw","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) fn_sse_piw(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_piwise, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":null,"dir":"Reference","previous_headings":"","what":"Piece-wise Regression — fun_canopy","title":"Piece-wise Regression — fun_canopy","text":"Piece-wise Regression","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Piece-wise Regression — fun_canopy","text":"","code":"fun_canopy(t, t1 = 45, t2 = 80, k = 0.9)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Piece-wise Regression — fun_canopy","text":"t Numeric value. t1 First break point. t2 t value reach maximum value. k Maximum y value.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Piece-wise Regression — fun_canopy","text":"value","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/fun_canopy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Piece-wise Regression — fun_canopy","text":"","code":"library(exploreHTP) x <- seq(0, 108, 0.1) y_hat <- sapply(x, FUN = fun_canopy, t1 = 34.9, t2 = 61.8, k = 100) plot(x, y_hat, type = \"l\") lines(x, y_hat, col = \"red\") abline(v = c(34.9, 61.8), lty = 2)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plant Height Modelling — height_HTP","title":"Plant Height Modelling — height_HTP","text":"Plant Height Modelling","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plant Height Modelling — height_HTP","text":"","code":"height_HTP( x, height = \"PH\", canopy = \"Canopy\", plot_id = NULL, fn = c(\"fn_exp1_exp\", \"fn_exp1_lin\", \"fn_exp2_exp\", \"fn_exp2_lin\"), ... )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plant Height Modelling — height_HTP","text":"x object class read_HTP, containing results read_HTP() function. height string specifying plant height trait modeled. Default \"PH\". canopy string specifying canopy trait modeled. Default \"Canopy\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. fn One following options: \"fn_exp1_exp\", \"fn_exp1_lin\", \"fn_exp2_exp\", \"fn_exp2_lin\". ... Additional arguments passed modeler_HTP() function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plant Height Modelling — height_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame data used. fn call used calculate AUC. max_time Maximum time value used calculating AUC.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/height_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plant Height Modelling — height_HTP","text":"","code":"library(exploreHTP) data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) ph_1 <- height_HTP( x = results, height = \"PH\", canopy = \"Canopy\", plot_id = 60, fn = \"fn_exp2_lin\" ) print(ph_1) #> #> Call: #> PH ~ fn_exp2_lin(time, t1, t2, alpha, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.03205 0.03205 0.03205 0.03205 0.03205 0.03205 #> #> Optimization Results `head()`: #> plot genotype t2 alpha beta sse t1 auc #> 60 W19026-15 62 0.0011 -0.0166 0.032 38 28.5 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.536 secs 100% 1054 (plot) #> plot(x = ph_1, plot_id = 60) ph_2 <- height_HTP( x = results, height = \"PH\", canopy = \"Canopy\", plot_id = 60, fn = \"fn_exp2_exp\" ) plot(x = ph_2, plot_id = 60) print(ph_2) #> #> Call: #> PH ~ fn_exp2_exp(time, t1, t2, alpha, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.009253 0.009253 0.009253 0.009253 0.009253 0.009253 #> #> Optimization Results `head()`: #> plot genotype t2 alpha beta sse t1 auc #> 60 W19026-15 62 0.00117 -0.0346 0.00925 38 28 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.4449 secs 100% 1071 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Maturity Modelling — maturity_HTP","title":"Maturity Modelling — maturity_HTP","text":"Maturity Modelling","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Maturity Modelling — maturity_HTP","text":"","code":"maturity_HTP(x, index = \"GLI\", canopy = \"Canopy\", plot_id = NULL, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Maturity Modelling — maturity_HTP","text":"x object class read_HTP, containing results read_HTP() function. index string specifying canopy trait modeled. Default \"GLI\". canopy string specifying canopy trait modeled. Default \"Canopy\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. ... Additional arguments passed modeler_HTP() function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Maturity Modelling — maturity_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame corrected possibly zero-augmented canopy data. fn call used calculate AUC. max_time Maximum time value used calculating AUC.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/maturity_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Maturity Modelling — maturity_HTP","text":"","code":"library(exploreHTP) data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) mat <- maturity_HTP( x = results, index = \"GLI_2\", canopy = \"Canopy\", plot_id = c(195, 40) ) plot(mat, plot_id = c(195, 40)) print(mat) #> #> Call: #> GLI_2 ~ fn_lin_pl_lin2(time, t1, t2, dt, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 #> #> Optimization Results `head()`: #> plot genotype t1 t2 dt k beta sse auc t3 #> 40 W17043-37 36.9 66.4 13.4 0.369 -0.0106 6.77e-04 16.6 79.9 #> 195 W16219-8 39.6 68.3 25.1 0.323 -0.0100 1.02e-05 16.4 93.3 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.6868 secs 100% 341 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Metrics for modeler_HTP — metrics_HTP","title":"Metrics for modeler_HTP — metrics_HTP","text":"Computes various performance metrics modeler_HTP object. function calculates Sum Squared Errors (SSE), Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Coefficient Determination (R-squared).","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Metrics for modeler_HTP — metrics_HTP","text":"","code":"metrics_HTP(x, .by_plot = TRUE)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Metrics for modeler_HTP — metrics_HTP","text":"x object class `modeler_HTP` containing necessary data compute metrics. .by_plot Return metrics plot? TRUE default.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Metrics for modeler_HTP — metrics_HTP","text":"data frame containing calculated metrics grouped plot, row, range, genotype, trait.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Metrics for modeler_HTP — metrics_HTP","text":"Sum Squared Errors (SSE): $$SSE = \\sum_{=1}^{n} (y_i - \\hat{y}_i)^2$$Mean Absolute Error (MAE): $$MAE = \\frac{1}{n} \\sum_{=1}^{n} |y_i - \\hat{y}_i|$$Mean Squared Error (MSE): $$MSE = \\frac{1}{n} \\sum_{=1}^{n} (y_i - \\hat{y}_i)^2$$Root Mean Squared Error (RMSE): $$RMSE = \\sqrt{\\frac{1}{n} \\sum_{=1}^{n} (y_i - \\hat{y}_i)^2}$$Coefficient Determination (R-squared): $$R^2 = 1 - \\frac{\\sum_{=1}^{n} (y_i - \\hat{y}_i)^2}{\\sum_{=1}^{n} (y_i - \\bar{y})^2}$$","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/metrics_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Metrics for modeler_HTP — metrics_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) x <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(1:2)) plot(x, c(1:2)) print(x) #> #> Call: #> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 0.4489 2.0903 3.7317 3.7317 5.3731 7.0145 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc dt slope #> 1 W17037-24 38.6 61.0 0.449 99.8 5807 22.4 4.45 #> 2 W17066-22 35.2 60.7 7.014 100.0 6004 25.6 3.91 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.7663 secs 100% 290.5 (plot) #> metrics_HTP(x) #> # A tibble: 2 × 11 #> plot row range genotype trait SSE MAE MSE RMSE r_squared n #> #> 1 1 1 1 W17037-24 Canopy 0.449 0.0744 0.0499 0.223 1.00 9 #> 2 2 2 1 W17066-22 Canopy 7.01 0.468 0.779 0.883 1.00 9"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Modeler HTP — modeler_HTP","title":"Modeler HTP — modeler_HTP","text":"Modeler HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modeler HTP — modeler_HTP","text":"","code":"modeler_HTP( x, index = \"GLI\", plot_id = NULL, check_negative = TRUE, add_zero = TRUE, max_as_last = FALSE, method = c(\"subplex\", \"pracmanm\", \"anms\"), return_method = FALSE, parameters = NULL, lower = -Inf, upper = Inf, initial_vals = NULL, fixed_params = NULL, fn = \"fn_piwise\", metric = \"sse\", n_points = 1000, max_time = NULL, control = list() )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modeler HTP — modeler_HTP","text":"x object class read_HTP, containing results read_HTP() function. index string specifying trait modeled. Default \"GLI\". plot_id optional vector plot IDs filter data. Default NULL, meaning plots used. check_negative Logical. Convert negative values zero. TRUE default. add_zero TRUE FALSE. Add zero time series.TRUE default. max_as_last Logical. TRUE, adds maximum value reaching local maximum. Default FALSE. method vector methods used, character string. See optimx package. c(\"subplex\", \"pracmanm\", \"anms\") default. return_method TRUE FALSE. return method selected optimization table. FALSE default. parameters named vector specifying initial values parameters optimized. c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01) default plots. lower Bounds variables methods \"L-BFGS-B\" can handle box (bounds) constraints. upper Bounds variables methods \"L-BFGS-B\" can handle box (bounds) constraints. initial_vals data.frame columns . Specific initial values per plot. fixed_params data.frame columns . fn String character name function \"fn_lin_pl_lin\". metric character string specifying metric minimize. Can \"sse\", \"mae\", \"mse\" \"rmse\". Default \"sse\". n_points Number time points approximate Area Curve (AUC). 1000 default. max_time Maximum time value calculating AUC. NULL default takes last time point. control list control parameters passed optimization function. e.g. list(maxit = 500)","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modeler HTP — modeler_HTP","text":"object class modeler_HTP, list containing following elements: param data frame containing optimized parameters related information. dt data frame data used. fn call used calculate AUC. max_time Maximum time value used calculating AUC. metrics Metrics summary models. execution Execution time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/modeler_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Modeler HTP — modeler_HTP","text":"","code":"library(exploreHTP) suppressMessages(library(dplyr)) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) mat <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195), parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin\", ) plot(mat, plot_id = c(195)) print(mat) #> #> Call: #> GLI_2 ~ fn_lin_pl_lin(time, t1, t2, t3, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.024e-05 1.024e-05 1.024e-05 1.024e-05 1.024e-05 1.024e-05 #> #> Optimization Results `head()`: #> plot genotype t1 t2 t3 k beta sse auc #> 195 W16219-8 39.6 68.3 93.3 0.323 -0.01 1.02e-05 16.4 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.8224 secs 100% 896 (plot) #> can <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", max_as_last = TRUE ) plot(can, plot_id = c(195)) print(can) #> #> Call: #> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.877e-18 1.877e-18 1.877e-18 1.877e-18 1.877e-18 1.877e-18 #> #> Optimization Results `head()`: #> plot genotype t1 t2 k sse auc #> 195 W16219-8 38.7 62 100 1.88e-18 5765 #> #> Metrics: #> Plots Timing Convergence Iterations #> 1 0.5223 secs 100% 349 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class canopyHTP — plot.canopyHTP","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"Create several plots object class canopyHTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"","code":"# S3 method for canopyHTP plot(x, plot_id = NULL, label_size = 3, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"x object inheriting class canopyHTP resulting executing function canopy_model() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopyHTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class canopyHTP — plot.canopyHTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) print(results) #> $summ_traits #> # A tibble: 16 × 12 #> trait time Min Mean Median Max SD CV n #> #> 1 Canopy 29 0 0 0 0 0 NaN 196 #> 2 Canopy 36 0 2.86 1.77 14.5 3.12 1.09 196 #> 3 Canopy 42 0.731 22.7 22.3 44.1 9.00 0.397 196 #> 4 Canopy 56 32.8 74.0 73.7 99.2 12.2 0.165 196 #> 5 Canopy 76 89.6 99.7 100 100 1.05 0.0105 196 #> 6 Canopy 92 63.1 97.1 98.5 100. 4.24 0.0436 196 #> 7 Canopy 100 27.6 82.7 87.5 99.7 14.8 0.179 196 #> 8 Canopy 108 5.15 68.8 74.4 99.1 21.0 0.305 196 #> 9 PH 29 Inf NaN NA -Inf NA NA 0 #> 10 PH 36 -0.0107 0.0232 0.0236 0.0513 0.00877 0.377 176 #> 11 PH 42 -0.0350 0.0719 0.0730 0.205 0.0452 0.629 196 #> 12 PH 56 -0.122 0.0353 0.0218 0.346 0.0802 2.27 196 #> 13 PH 76 0.352 0.563 0.564 0.756 0.0759 0.135 196 #> 14 PH 92 0.220 0.359 0.353 0.527 0.0557 0.155 196 #> 15 PH 100 0.0510 0.234 0.235 0.413 0.0765 0.327 196 #> 16 PH 108 0.261 0.724 0.757 0.988 0.170 0.235 196 #> # ℹ 3 more variables: n_miss , miss_perc , neg_prop #> #> $exp_design_resum #> # A tibble: 1 × 6 #> n n_gen n_row n_range num_of_reps num_of_gen #> #> 1 196 185 14 14 1_2 174_11 #> #> $locals_min_max #> # A tibble: 2 × 3 #> trait local_min_at local_max_at #> #> 1 Canopy \"\" 76 #> 2 PH \"56_100\" 42_76 #> #> $dt_long #> # A tibble: 3,136 × 7 #> time plot row range genotype trait value #> #> 1 29 1 1 1 W17037-24 Canopy 0 #> 2 29 1 1 1 W17037-24 PH NA #> 3 36 1 1 1 W17037-24 Canopy 0.648 #> 4 36 1 1 1 W17037-24 PH 0.0154 #> 5 42 1 1 1 W17037-24 Canopy 14.4 #> 6 42 1 1 1 W17037-24 PH 0.0173 #> 7 56 1 1 1 W17037-24 Canopy 74.5 #> 8 56 1 1 1 W17037-24 PH 0.0941 #> 9 76 1 1 1 W17037-24 Canopy 99.7 #> 10 76 1 1 1 W17037-24 PH 0.456 #> # ℹ 3,126 more rows #> out <- canopy_model(results, plot_id = 22) plot(out)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class canopy_HTP — plot.canopy_HTP","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"Create several plots object class canopy_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"","code":"# S3 method for canopy_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"x object inheriting class canopy_HTP resulting executing function canopy_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Numeric. Size labels plot. Default 4. base_size Base font size, given pts. Default 14. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.canopy_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class canopy_HTP — plot.canopy_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" out <- canopy_HTP( results = results, canopy = \"Canopy\", plot_id = c(22, 40), correct_max = TRUE, add_zero = TRUE ) names(out) #> [1] \"param\" \"dt\" \"fn\" \"max_time\" plot(out, c(22, 40)) out$param$deltaT <- out$param$t2 - out$param$t1 out$param$slope <- out$param$k / out$param$deltaT out$param #> # A tibble: 2 × 11 #> plot genotype row range t1 t2 k sse total_area deltaT slope #> #> 1 22 W17047-5 8 2 39.5 74.6 98.8 0.297 5034. 35.1 2.81 #> 2 40 W17043-37 12 3 34.8 60.8 100 0.00148 6017. 26.0 3.84"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class height_HTP — plot.height_HTP","title":"Plot an object of class height_HTP — plot.height_HTP","text":"Create several plots object class height_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class height_HTP — plot.height_HTP","text":"","code":"# S3 method for height_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class height_HTP — plot.height_HTP","text":"x object inheriting class height_HTP resulting executing function height_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. base_size Base font size, given pts. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class height_HTP — plot.height_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class height_HTP — plot.height_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.height_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class height_HTP — plot.height_HTP","text":"","code":"library(exploreHTP) data(dt_chips) results <- read_HTP( data = dt_chips, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" out <- canopy_HTP( results = results, canopy = \"Canopy\", plot_id = c(60, 150), correct_max = TRUE, add_zero = TRUE ) names(out) #> [1] \"param\" \"dt\" \"fn\" \"max_time\" plot(out, plot_id = c(60, 150)) ph_1 <- height_HTP( results = results, canopy = out, plant_height = \"PH\", add_zero = TRUE, method = c(\"nlminb\", \"anms\", \"mla\", \"pracmanm\", \"subplex\"), return_method = TRUE, parameters = c(t2 = 67, alpha = 1 / 600, beta = -1 / 80), fn_sse = sse_exp2_exp, fn = quote(fn_exp2_exp(time, t1, t2, alpha, beta)) ) plot(x = ph_1, plot_id = c(60, 150)) ph_1$param #> # A tibble: 2 × 11 #> plot genotype row range t2 alpha beta t1 method sse #> #> 1 60 W19026-15 4 5 62 0.00117 -0.0346 38.0 subplex 0.00948 #> 2 150 W19023-21 10 11 62 0.000783 -0.0183 33.8 subplex 0.00143 #> # ℹ 1 more variable: total_area ph_2 <- height_HTP( results = results, canopy = out, plant_height = \"PH\", add_zero = TRUE, method = c(\"nlminb\", \"anms\", \"mla\", \"pracmanm\", \"subplex\"), return_method = TRUE, parameters = c(t2 = 67, alpha = 1 / 600, beta = -1 / 80), fn_sse = sse_exp2_lin, fn = quote(fn_exp2_lin(time, t1, t2, alpha, beta)) ) plot(x = ph_2, plot_id = c(60, 150)) ph_2$param #> # A tibble: 2 × 11 #> plot genotype row range t2 alpha beta t1 method sse #> #> 1 60 W19026-15 4 5 62 0.00110 -0.0166 38.0 subplex 0.0323 #> 2 150 W19023-21 10 11 62 0.000767 -0.0110 33.8 subplex 0.00329 #> # ℹ 1 more variable: total_area "},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class maturity_HTP — plot.maturity_HTP","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"Create several plots object class maturity_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"","code":"# S3 method for maturity_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"x object inheriting class maturity_HTP resulting executing function maturity_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. base_size Base font size, given pts. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.maturity_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class maturity_HTP — plot.maturity_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" out <- canopy_HTP( results = results, canopy = \"Canopy\", plot_id = c(195, 40), correct_max = TRUE, add_zero = TRUE ) mat <- maturity_HTP( results = results, canopy = out, index = \"GLI_2\", parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn_sse = sse_lin_pl_lin, fn = quote(fn_lin_pl_lin(time, t1, t2, t3, k, beta)) ) plot(mat, plot_id = c(195, 40)) mat$param #> # A tibble: 2 × 11 #> plot genotype row range t1 t2 t3 k beta sse total_area #> #> 1 40 W17043-37 12 3 36.9 66.4 79.9 0.369 -0.0106 6.77e-4 16.6 #> 2 195 W16219-8 13 14 39.6 68.3 93.3 0.323 -0.0100 1.02e-5 16.4"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class modeler_HTP — plot.modeler_HTP","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"Create several plots object class modeler_HTP","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"","code":"# S3 method for modeler_HTP plot(x, plot_id = NULL, label_size = 4, base_size = 14, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"x object inheriting class modeler_HTP resulting executing function modeler_HTP() plot_id avoid many plots one figure. Filter Plot Id. label_size Label size. 3 default. base_size Base font size, given pts. ... graphical parameters. future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"ggplot object.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.modeler_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class modeler_HTP — plot.modeler_HTP","text":"","code":"library(exploreHTP) suppressMessages(library(dplyr)) data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"GLI_2\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" mat <- modeler_HTP( x = results, index = \"GLI_2\", plot_id = c(195, 40), parameters = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), fn = \"fn_lin_pl_lin\", ) plot(mat, plot_id = c(195, 40)) mat #> #> Call: #> GLI_2 ~ fn_lin_pl_lin(time, t1, t2, t3, k, beta) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 #> #> Optimization Results `head()`: #> plot genotype t1 t2 t3 k beta sse auc #> 40 W17043-37 36.9 66.4 79.9 0.369 -0.0106 6.77e-04 16.6 #> 195 W16219-8 39.6 68.3 93.3 0.323 -0.0100 1.02e-05 16.4 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 1.5733 secs 100% 1122.5 (plot) #> can <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\" ) plot(can, plot_id = c(195, 40)) can #> #> Call: #> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 390.5 1004.2 1618.0 1618.0 2231.8 2845.5 #> #> Optimization Results `head()`: #> plot genotype t1 t2 k sse auc #> 40 W17043-37 34.8 53.7 72.5 2846 4623 #> 195 W16219-8 38.7 60.0 91.7 390 5377 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.7778 secs 100% 547 (plot) #> fixed_params <- results$dt_long |> filter(trait %in% \"Canopy\") |> group_by(plot, genotype) |> summarise(k = max(value, na.rm = TRUE), .groups = \"drop\") can <- modeler_HTP( x = results, index = \"Canopy\", plot_id = c(195, 40), parameters = c(t1 = 45, t2 = 80, k = 0.9), fn = \"fn_piwise\", fixed_params = fixed_params ) plot(can, plot_id = c(195, 40)) can #> #> Call: #> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 663 2064 3466 3466 4867 6268 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc #> 40 W17043-37 34.8 60.8 6268 100 6017 #> 195 W16219-8 38.7 62.0 663 100 5765 #> #> Metrics: #> Plots Timing Convergence Iterations #> 2 0.7671 secs 100% 312.5 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an Object of Class read_HTP — plot.read_HTP","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"Creates various plots object class read_HTP. Depending specified type, function can generate plots show correlations traits time, correlations time points trait, evolution traits time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"","code":"# S3 method for read_HTP plot( x, type = \"trait_by_time\", label_size = 4, signif = FALSE, method = \"pearson\", filter_trait = NULL, n_row = NULL, n_col = NULL, base_size = 13, return_gg = FALSE, ... )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"x object inheriting class read_HTP, resulting executing function read_HTP(). type Character string specifying type plot generate. Available options : \"trait_by_time\" Plots correlations traits time (default). \"time_by_trait\" Plots correlations time points trait. \"evolution\" Plots evolution traits time. label_size Numeric. Size labels plot. Default 4. signif Logical. TRUE, adds p-values correlation plot labels. Default FALSE. method Character string specifying method correlation calculation. Available options \"pearson\" (default), \"spearman\", \"kendall\". filter_trait Character vector specifying traits exclude plot. n_row Integer specifying number rows use facet_wrap(). Default NULL. n_col Integer specifying number columns use facet_wrap(). Default NULL. base_size Numeric. Base font size plot. Default 13. return_gg Logical. TRUE, returns ggplot object instead printing . Default FALSE. ... graphical parameters future improvements.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"ggplot object invisible data.frame containing correlation table type \"trait_by_time\" \"time_by_trait\".","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot.read_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an Object of Class read_HTP — plot.read_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) table <- plot(results, label_size = 4, signif = TRUE, n_row = 2) table #> # A tibble: 7 × 7 #> time col row corr p.value n signi #> #> 1 36 Canopy PH 0.46 8.23e-11 176 *** #> 2 42 Canopy PH 0.67 8.55e-27 196 *** #> 3 56 Canopy PH -0.21 3.65e- 3 196 ** #> 4 76 Canopy PH 0.3 1.41e- 5 196 *** #> 5 92 Canopy PH 0.28 5.96e- 5 196 *** #> 6 100 Canopy PH 0.32 6.45e- 6 196 *** #> 7 108 Canopy PH 0.07 3.14e- 1 196 ns plot(results, type = \"time_by_trait\", label_size = 4, signif = TRUE)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Function — plot_fn","title":"Plot Function — plot_fn","text":"function plots user-defined function specified interval annotates plot calculated Area Curve (AUC) parameter values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Function — plot_fn","text":"","code":"plot_fn( fn = \"fn_piwise\", params = c(t1 = 34.9, t2 = 61.8, k = 100), interval = c(0, 100), n_points = 1000, x_auc_label = NULL, y_auc_label = NULL, auc_label_size = 4, param_label_size = 4, base_size = 12, color = \"red\" )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Function — plot_fn","text":"fn character string representing name function plotted. Default \"fn_piwise\". params named numeric vector parameters passed function. Default c(t1 = 34.9, t2 = 61.8, k = 100). interval numeric vector length 2 specifying interval function plotted. Default c(0, 100). n_points integer specifying number points used plotting. Default 1000. x_auc_label numeric value specifying x-coordinate AUC label. Default NULL. y_auc_label numeric value specifying y-coordinate AUC label. Default NULL. auc_label_size numeric value specifying size AUC label text. Default 3. param_label_size numeric value specifying size parameter label text. Default 3. base_size numeric value specifying base size plot's theme. Default 12. color character string specifying color plot lines area fill. Default \"red\".","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Function — plot_fn","text":"ggplot object representing plot.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/plot_fn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Function — plot_fn","text":"","code":"# Example usage plot_fn( fn = \"fn_piwise\", params = c(t1 = 34.9, t2 = 61.8, k = 100), interval = c(0, 100), n_points = 1000 ) plot_fn( fn = \"fn_lin_pl_lin\", params <- c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), interval = c(0, 100), n_points = 1000, base_size = 12 )"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Print an object of class modeler_HTP — print.modeler_HTP","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"Prints information modeler_HTP function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"","code":"# S3 method for modeler_HTP print(x, ...)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"x object fitted function modeler_HTP(). ... Options used tibble package format output. See `tibble::print()` details.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"object inheriting class modeler_HTP.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"Johan Aparicio [aut]","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/print.modeler_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Print an object of class modeler_HTP — print.modeler_HTP","text":"","code":"library(exploreHTP) data(dt_potato) results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) out <- canopy_HTP(x = results, index = \"Canopy\", plot_id = c(1:11)) plot(out, plot_id = c(1:11)) print(out) #> #> Call: #> Canopy ~ fn_piwise(time, t1, t2, k) #> #> Sum of Squares Error `scale()`: #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> -0.6387 -0.6232 -0.5200 0.0000 0.3479 2.5892 #> #> Optimization Results `head()`: #> plot genotype t1 t2 sse k auc dt slope #> 1 W17037-24 38.6 61.0 4.49e-01 99.8 5807 22.4 4.45 #> 2 W17066-22 35.2 60.7 7.01e+00 100.0 6004 25.6 3.91 #> 3 W16091-5 33.8 59.9 4.26e+00 100.0 6119 26.1 3.83 #> 4 W17037-26 39.3 65.5 2.58e-26 99.8 5551 26.1 3.82 #> #> Metrics: #> Plots Timing Convergence Iterations #> 11 4.304 secs 100% 315.09 (plot) #>"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":null,"dir":"Reference","previous_headings":"","what":"Read HTP Data — read_HTP","title":"Read HTP Data — read_HTP","text":"Reads processes high-throughput phenotyping (HTP) data data frame wide format.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read HTP Data — read_HTP","text":"","code":"read_HTP(data, genotype, time, plot, traits, row, range)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read HTP Data — read_HTP","text":"data data.frame wide format containing HTP data. genotype character string indicating column `data` contains genotype information. time character string indicating column `data` contains time points. plot character string indicating column `data` contains plot IDs. traits character vector specifying columns `data` contain traits analyzed. row character string indicating column `data` contains row coordinates. range character string indicating column `data` contains range coordinates.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read HTP Data — read_HTP","text":"object class read_HTP, list containing following elements: summ_traits data.frame containing summary statistics trait time point, including minimum, mean, median, maximum, standard deviation, coefficient variation, number non-missing values, percentage missing values, percentage negative values. exp_design_resum data.frame summarizing experimental design, including number unique genotypes, rows, ranges, replication structure. locals_min_max data.frame containing local minima maxima mean trait values time. dt_long data.frame long format, columns time, plot, row, range, genotype, trait, value.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read HTP Data — read_HTP","text":"function processes prepares HTP data analyzed.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/read_HTP.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read HTP Data — read_HTP","text":"","code":"library(exploreHTP) data(dt_potato) dt_potato <- dt_potato results <- read_HTP( data = dt_potato, genotype = \"Gen\", time = \"DAP\", plot = \"Plot\", traits = c(\"Canopy\", \"PH\"), row = \"Row\", range = \"Range\" ) names(results) #> [1] \"summ_traits\" \"exp_design_resum\" \"locals_min_max\" \"dt_long\" head(results$summ_traits) #> # A tibble: 6 × 12 #> trait time Min Mean Median Max SD CV n miss `miss%` #> #> 1 Canopy 29 0 0 0 0 0 NaN 196 0 0 #> 2 Canopy 36 0 2.95 1.84 15.1 3.22 1.09 196 0 0 #> 3 Canopy 42 0.763 23.4 22.9 46.2 9.31 0.398 196 0 0 #> 4 Canopy 56 33.4 75.8 75.2 98.9 12.4 0.164 196 0 0 #> 5 Canopy 76 89.1 99.7 100 100 1.04 0.0104 196 0 0 #> 6 Canopy 92 62.5 97.0 98.4 100. 4.36 0.0449 196 0 0 #> # ℹ 1 more variable: `neg%` plot(results, label_size = 4, signif = TRUE, n_row = 2) # New data format head(results$dt_long) #> # A tibble: 6 × 7 #> time plot row range genotype trait value #> #> 1 29 1 1 1 W17037-24 Canopy 0 #> 2 29 1 1 1 W17037-24 PH NA #> 3 36 1 1 1 W17037-24 Canopy 0.67 #> 4 36 1 1 1 W17037-24 PH 0.0154 #> 5 42 1 1 1 W17037-24 Canopy 15.1 #> 6 42 1 1 1 W17037-24 PH 0.0173"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function — sse","title":"Sum of Squares Error Function — sse","text":"Function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function — sse","text":"","code":"sse(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function — sse","text":"params Numeric vector two parameters. t Independent variable. y Response variable.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function — sse","text":"sum squares error","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/SSE.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function — sse","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) sse(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_canopy, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp1_exp function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"","code":"sse_exp1_exp(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"params Numeric vector. parameters fn_exp1_exp function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Exponential Model 1 — sse_exp1_exp","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp1_exp(params, t, y, t1) # Should return the SSE value #> [1] 639.3013"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp1_lin function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"","code":"sse_exp1_lin(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"params Numeric vector. parameters fn_exp1_lin function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp1_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Linear Model 1 — sse_exp1_lin","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp1_lin(params, t, y, t1) # Should return the SSE value #> [1] 698.4337"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp2_exp function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"","code":"sse_exp2_exp(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"params Numeric vector. parameters fn_exp2_exp function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_exp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Exponential Model 2 — sse_exp2_exp","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp2_exp(params, t, y, t1) # Should return the SSE value #> [1] 2.708789e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_exp2_lin function.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"","code":"sse_exp2_lin(params, t, y, t1)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"params Numeric vector. parameters fn_exp2_lin function, params[1] t2, params[2] alpha, params[3] beta. t Numeric vector. time values. y Numeric vector. observed values. t1 Numeric. lower threshold time.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_exp2_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Exponential Linear Model 2 — sse_exp2_lin","text":"","code":"params <- c(50, 0.1, -0.01) t <- c(10, 20, 30, 40, 50, 60) y <- c(0, 0, 0.2, 0.5, 0.8, 0.9) t1 <- 20 sse_exp2_lin(params, t, y, t1) # Should return the SSE value #> [1] 2.978768e+78"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"Calculates sum squared errors (SSE) observed values values predicted fn_lin_pl_lin function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"","code":"sse_lin_pl_lin(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"params Numeric vector. parameters fn_lin_pl_lin function, params[1] t1, params[2] t2, params[3] t3 params[4] k params[5] beta. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Linear Plateau Linear Model — sse_lin_pl_lin","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 0, 0.027, 0.185, 0.325, 0.321, 0.256, 0.176) sse_lin_pl_lin( params = c(t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01), t = x, y = y ) #> [1] 0.00616009 y_hat <- sapply( X = x, FUN = fn_lin_pl_lin, t1 = 38.7, t2 = 62, t3 = 90, k = 0.32, beta = -0.01 ) sum((y - y_hat)^2) #> [1] 0.00616009"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"Calculates sum squared errors (SSE) observed values values predicted fn_lin_pl_lin2 function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"","code":"sse_lin_pl_lin2(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"params Numeric vector. parameters fn_lin_pl_lin2 function, params[1] t1, params[2] t2, params[3] t3 params[4] k params[5] beta. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin2","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 0, 0.027, 0.185, 0.325, 0.321, 0.256, 0.176) sse_lin_pl_lin2( params = c(t1 = 38.7, dt = 28, t3 = 90, k = 0.32, beta = -0.01), t = x, y = y ) #> [1] 0.00616009 y_hat <- sapply( X = x, FUN = fn_lin_pl_lin2, t1 = 38.7, dt = 28, t3 = 90, k = 0.32, beta = -0.01 ) sum((y - y_hat)^2) #> [1] 0.00616009"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"Calculates sum squared errors (SSE) observed values values predicted fn_lin_pl_lin3 function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"","code":"sse_lin_pl_lin3(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"params Numeric vector. parameters fn_lin_pl_lin3 function, params[1] t1, params[2] t2, params[3] t3 params[4] k params[5] beta. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_lin_pl_lin3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Linear Plateau Linear Model with Constrains — sse_lin_pl_lin3","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 0, 0.027, 0.185, 0.325, 0.321, 0.256, 0.176) sse_lin_pl_lin3( params = c(t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01), t = x, y = y ) #> [1] 0.00616009 y_hat <- sapply( X = x, FUN = fn_lin_pl_lin3, t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01 ) sum((y - y_hat)^2) #> [1] 0.00616009"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Sum of Squares Error Function for Piecewise Model — sse_piwise","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"Calculates sum squared errors (SSE) observed values values predicted fn_piwise function. objective function minimized optimx package.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"","code":"sse_piwise(params, t, y)"},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"params Numeric vector. parameters fn_piwise function, params[1] t1 params[2] t2. t Numeric vector. time values. y Numeric vector. observed values.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"numeric value representing sum squared errors.","code":""},{"path":"https://apariciojohan.github.io/exploreHTP/reference/sse_piwise.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sum of Squares Error Function for Piecewise Model — sse_piwise","text":"","code":"library(exploreHTP) x <- c(0, 29, 36, 42, 56, 76, 92, 100, 108) y <- c(0, 0, 4.379, 26.138, 78.593, 100, 100, 100, 100) sse_piwise(params = c(34.9, 61.8), t = x, y = y) #> [1] 0.1733558 y_hat <- sapply(x, FUN = fn_piwise, t1 = 34.9, t2 = 61.8, k = 100) sum((y - y_hat)^2) #> [1] 0.1733558"},{"path":"https://apariciojohan.github.io/exploreHTP/news/index.html","id":"explorehtp-010","dir":"Changelog","previous_headings":"","what":"exploreHTP 0.1.0","title":"exploreHTP 0.1.0","text":"Initial CRAN submission.","code":""}] diff --git a/index.Rmd b/index.Rmd index b4affcb..ea2858d 100644 --- a/index.Rmd +++ b/index.Rmd @@ -164,7 +164,7 @@ mat <- maturity_HTP( x = results, index = "GLI_2", canopy = "Canopy", - plot_id = c(195, 40) + plot_id = c(195, 40, 20) ) ``` diff --git a/index.md b/index.md index cae5fea..6b5663e 100644 --- a/index.md +++ b/index.md @@ -121,7 +121,7 @@ out <- canopy_HTP(x = results, index = "Canopy", plot_id = c(60, 150)) print(out) Call: -fn_piwise(time, t1, t2, k) +Canopy ~ fn_piwise(time, t1, t2, k) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -134,7 +134,7 @@ Optimization Results `head()`: Metrics: Plots Timing Convergence Iterations - 2 0.6873 secs 100% 273.5 (plot) + 2 0.7179 secs 100% 273.5 (plot) ``` ``` r @@ -164,7 +164,7 @@ ph_1 <- height_HTP( print(ph_1) Call: -fn_exp2_exp(time, t1, t2, alpha, beta) +PH ~ fn_exp2_exp(time, t1, t2, alpha, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. @@ -177,7 +177,7 @@ Optimization Results `head()`: Metrics: Plots Timing Convergence Iterations - 2 0.7988 secs 100% 964.5 (plot) + 2 0.8166 secs 100% 964.5 (plot) ``` ``` r @@ -208,7 +208,7 @@ mat <- maturity_HTP( x = results, index = "GLI_2", canopy = "Canopy", - plot_id = c(195, 40) + plot_id = c(195, 40, 20) ) ``` @@ -216,20 +216,21 @@ mat <- maturity_HTP( print(mat) Call: -fn_lin_pl_lin2(time, t1, t2, dt, k, beta) +GLI_2 ~ fn_lin_pl_lin2(time, t1, t2, dt, k, beta) Sum of Squares Error: Min. 1st Qu. Median Mean 3rd Qu. Max. -1.024e-05 1.768e-04 3.435e-04 3.435e-04 5.101e-04 6.767e-04 +6.229e-06 8.233e-06 1.024e-05 2.310e-04 3.435e-04 6.767e-04 Optimization Results `head()`: - plot genotype t1 t2 dt k beta sse auc t3 - 40 W17043-37 36.9 66.4 13.4 0.369 -0.0106 6.77e-04 16.6 79.9 - 195 W16219-8 39.6 68.3 25.1 0.323 -0.0100 1.02e-05 16.4 93.3 + plot genotype t1 t2 dt k beta sse auc t3 + 20 W17067-7 35.8 68.5 14.5 0.362 -0.00405 6.23e-06 19.0 83.1 + 40 W17043-37 36.9 66.4 13.4 0.369 -0.01057 6.77e-04 16.6 79.9 + 195 W16219-8 39.6 68.3 25.1 0.323 -0.01005 1.02e-05 16.4 93.3 Metrics: - Plots Timing Convergence Iterations - 2 0.5909 secs 100% 341 (plot) + Plots Timing Convergence Iterations + 3 0.8804 secs 100% 444.33 (plot) ``` ``` r @@ -240,5 +241,6 @@ plot(mat, plot_id = c(195, 40)) | plot | genotype | row | range | t1 | t2 | dt | k | beta | sse | auc | t3 | |-----:|:----------|----:|------:|-------:|-------:|-------:|------:|-------:|------:|-------:|-------:| +| 20 | W17067-7 | 6 | 2 | 35.818 | 68.529 | 14.540 | 0.362 | -0.004 | 0.000 | 18.977 | 83.069 | | 40 | W17043-37 | 12 | 3 | 36.880 | 66.416 | 13.438 | 0.369 | -0.011 | 0.001 | 16.615 | 79.854 | | 195 | W16219-8 | 13 | 14 | 39.591 | 68.279 | 25.058 | 0.323 | -0.010 | 0.000 | 16.376 | 93.336 | diff --git a/man/modeler_HTP.Rd b/man/modeler_HTP.Rd index 60bf8bb..8a92015 100644 --- a/man/modeler_HTP.Rd +++ b/man/modeler_HTP.Rd @@ -21,7 +21,8 @@ modeler_HTP( fn = "fn_piwise", metric = "sse", n_points = 1000, - max_time = NULL + max_time = NULL, + control = list() ) } \arguments{ @@ -60,6 +61,8 @@ optimization in the table. \code{FALSE} by default.} \item{n_points}{Number of time points to approximate the Area Under the Curve (AUC). 1000 by default.} \item{max_time}{Maximum time value for calculating the AUC. \code{NULL} by default takes the last time point.} + +\item{control}{A list of control parameters to be passed to the optimization function. e.g. list(maxit = 500)} } \value{ An object of class \code{modeler_HTP}, which is a list containing the following elements: