Skip to content

Commit

Permalink
BREAKING CHANGES name of example dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
AparicioJohan committed Oct 23, 2024
1 parent b2ebc29 commit ab502a4
Show file tree
Hide file tree
Showing 55 changed files with 395 additions and 167 deletions.
4 changes: 2 additions & 2 deletions R/00_dt_potato.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' \item{Red - Canopy}{dbl denoting the drone-derived traits}
#' }
#' @source UW - Potato Breeding Program
"dt_potato"
"dt_potato_20"


#' Drone Data in Potato 2022
Expand All @@ -35,4 +35,4 @@
#' \item{Red - Canopy}{dbl denoting the drone-derived traits}
#' }
#' @source UW - Potato Breeding Program
"dt_chips"
"dt_potato_22"
4 changes: 2 additions & 2 deletions R/01_read.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#'
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' results <- dt_potato |>
#' data(dt_potato_20)
#' results <- dt_potato_20 |>
#' explorer(
#' x = DAP,
#' y = c(Canopy, PH),
Expand Down
14 changes: 7 additions & 7 deletions R/02_modeler.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
#'
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' explorer <- explorer(dt_potato, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' data(dt_potato_20)
#' explorer <- explorer(dt_potato_20, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' # Example 1
#' mod_1 <- dt_potato |>
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = GLI_2,
Expand All @@ -63,7 +63,7 @@
#' plot(mod_1, id = 195)
#' print(mod_1)
#' # Example 2
#' mod_2 <- dt_potato |>
#' mod_2 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down Expand Up @@ -337,9 +337,9 @@ modeler <- function(data,
#'
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' explorer <- explorer(dt_potato, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' mod_1 <- dt_potato |>
#' data(dt_potato_20)
#' explorer <- explorer(dt_potato_20, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = GLI_2,
Expand Down
6 changes: 3 additions & 3 deletions R/03_metrics.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ r_squared <- function(actual, predicted) {
#'
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' explorer <- explorer(dt_potato, x = DAP, y = c(Canopy, PH), id = Plot)
#' mod_1 <- dt_potato |>
#' data(dt_potato_20)
#' explorer <- explorer(dt_potato_20, x = DAP, y = c(Canopy, PH), id = Plot)
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down
4 changes: 2 additions & 2 deletions R/04_predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#' @export
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' mod_1 <- dt_potato |>
#' data(dt_potato_20)
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down
6 changes: 3 additions & 3 deletions R/05_coefficients.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#' @export
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' explorer <- explorer(dt_potato, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' mod_1 <- dt_potato |>
#' data(dt_potato_20)
#' explorer <- explorer(dt_potato_20, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down
4 changes: 2 additions & 2 deletions R/06_vcov.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#' @export
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' mod_1 <- dt_potato |>
#' data(dt_potato_20)
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down
4 changes: 2 additions & 2 deletions R/07_confint.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#' @export
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' mod_1 <- dt_potato |>
#' data(dt_potato_20)
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down
11 changes: 5 additions & 6 deletions R/utils_S3_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ plot_fn <- function(fn = "fn_piwise",
#' @export
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' explorer <- explorer(dt_potato, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' data(dt_potato_20)
#' explorer <- explorer(dt_potato_20, x = DAP, y = c(Canopy, GLI_2), id = Plot)
#' # Example 1
#' mod_1 <- dt_potato |>
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down Expand Up @@ -345,9 +345,8 @@ plot.modeler <- function(x,
#' @export
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' dt_potato <- dt_potato
#' results <- explorer(dt_potato, x = DAP, y = c(Canopy, PH), id = Plot)
#' data(dt_potato_20)
#' results <- explorer(dt_potato_20, x = DAP, y = c(Canopy, PH), id = Plot)
#' table <- plot(results, label_size = 4, signif = TRUE, n_row = 2)
#' table
#' plot(results, type = "x_by_var", label_size = 4, signif = TRUE)
Expand Down
6 changes: 3 additions & 3 deletions R/utils_S3_print.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#' @export
#' @examples
#' library(flexFitR)
#' data(dt_potato)
#' explorer <- explorer(dt_potato, x = DAP, y = c(Canopy, PH), id = Plot)
#' mod_1 <- dt_potato |>
#' data(dt_potato_20)
#' explorer <- explorer(dt_potato_20, x = DAP, y = c(Canopy, PH), id = Plot)
#' mod_1 <- dt_potato_20 |>
#' modeler(
#' x = DAP,
#' y = Canopy,
Expand Down
4 changes: 2 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ reference:
- title: Data
desc: Example Datasets
- contents:
- dt_potato
- dt_chips
- dt_potato_20
- dt_potato_22
- title: Growth Modelling
desc: Collection of functions
- contents:
Expand Down
11 changes: 5 additions & 6 deletions data-raw/DATASET.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
## code to prepare `DATASET` dataset goes here

dt_potato <- readr::read_csv("data-raw/dt_potato.csv")
dt_potato_20 <- readr::read_csv("data-raw/dt_potato.csv")
usethis::use_data(dt_potato_20, overwrite = TRUE)

usethis::use_data(dt_potato, overwrite = TRUE)


dt_chips <- readr::read_csv("data-raw/chips_2022.csv") |>
dt_potato_22 <- readr::read_csv("data-raw/chips_2022.csv") |>
select(Trial, DAP, Plot, row, range, Name, Total.yield, vine.maturity, Red:Canopy)
names(dt_chips) <- names(dt_potato)
names(dt_potato_22) <- names(dt_potato_20)

usethis::use_data(dt_chips, overwrite = TRUE)
usethis::use_data(dt_potato_22, overwrite = TRUE)
Binary file removed data/dt_chips.rda
Binary file not shown.
Binary file removed data/dt_potato.rda
Binary file not shown.
Binary file added data/dt_potato_20.rda
Binary file not shown.
Binary file added data/dt_potato_22.rda
Binary file not shown.
20 changes: 10 additions & 10 deletions docs/articles/canopy-model.html

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

Loading

0 comments on commit ab502a4

Please sign in to comment.