Skip to content

Commit 93ecc7a

Browse files
committed
refactor
1 parent dc7eacd commit 93ecc7a

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ importFrom(dplyr,distinct)
99
importFrom(dplyr,filter)
1010
importFrom(dplyr,group_by)
1111
importFrom(dplyr,group_split)
12+
importFrom(dplyr,if_else)
1213
importFrom(dplyr,left_join)
14+
importFrom(dplyr,mutate)
1315
importFrom(dplyr,pull)
1416
importFrom(dplyr,select)
1517
importFrom(dplyr,summarise)

R/add_co2.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ add_co2 <- function(data, co2, jitter_amount = NULL) {
3737

3838
product <- data_co2 |>
3939
unnest_product() |>
40+
mutate(benchmark = if_else(is.na(.data$benchmark), "all", .data$benchmark)) |>
4041
split_summarize_range_by_benchmark() |>
4142
map(\(.x) jitter_range_by_benchmark(.x, amount = jitter_amount)) |>
4243
map(\(.x) join_to(.x, unnest_product(data_co2))) |>

R/tiltAddCO2-package.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#' @importFrom dplyr filter
1010
#' @importFrom dplyr group_by
1111
#' @importFrom dplyr group_split
12+
#' @importFrom dplyr if_else
1213
#' @importFrom dplyr left_join
14+
#' @importFrom dplyr mutate
1315
#' @importFrom dplyr pull
1416
#' @importFrom dplyr select
1517
#' @importFrom dplyr summarise
@@ -27,8 +29,8 @@
2729
#' @importFrom tibble tribble
2830
#' @importFrom tidyselect all_of
2931
#' @importFrom tidyselect matches
32+
#' @importFrom tiltIndicator example_data_factory
3033
#' @importFrom withr local_options
3134
#' @importFrom withr local_seed
32-
#' @importFrom tiltIndicator example_data_factory
3335
## usethis namespace: end
3436
NULL

0 commit comments

Comments
 (0)