From 1e0a41def768878eaaec9abe3f5a8633e0228f0b Mon Sep 17 00:00:00 2001 From: biopsichas <svajunas.plunge@gmail.com> Date: Sat, 25 Feb 2023 21:13:11 +0200 Subject: [PATCH] updating after check() and adding function deprecation --- NAMESPACE | 1 + R/globals.R | 4 +++- R/plot_hru_pw.R | 2 ++ R/print_mgt.R | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index 920a3a7..ecd46e6 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -95,6 +95,7 @@ importFrom(readr,read_lines) importFrom(readr,write_delim) importFrom(readr,write_lines) importFrom(stats,density) +importFrom(stats,lag) importFrom(stringr,str_detect) importFrom(stringr,str_remove) importFrom(stringr,str_remove_all) diff --git a/R/globals.R b/R/globals.R index ed56251..351308e 100644 --- a/R/globals.R +++ b/R/globals.R @@ -6,4 +6,6 @@ utils::globalVariables(c("%&&%", "%//%", ".", "crop", "day", "ecanopy", "eplant" "tile", "time_out", "tmn", "tmpav", "tmx", "topo", "val_max", "val_mean", "val_min", "value", "value_sum", "var", "var1", "var2", "var3", "var4", "var5", "wndspd", "yr", "rhum", "rm_skp", "Date", "Values", "surq_gen", "latq", "perc", - "description", "flo", "..density..")) + "description", "flo", "..density..", "wateryld", "cn", "sw_final", "esr", "mmdd", + "lu_mgt_ini", "has_suffix", "suffix_upd", "lu_mgt_upd", "schedule_upd", + "plnt_com_upd", "n_chr")) diff --git a/R/plot_hru_pw.R b/R/plot_hru_pw.R index e21529e..cac9b1f 100644 --- a/R/plot_hru_pw.R +++ b/R/plot_hru_pw.R @@ -58,6 +58,7 @@ get_hru_id_by_attribute <- function(sim_verify, lum = NULL, mgt = NULL, soil = N #' @export #' plot_hru_pw_day <- function(sim_verify, hru_id, var, title = "", years = 1900:2100) { + .Deprecated("plot_hru_pw") plot_data <- sim_verify$hru_pw_day %>% filter(unit %in% hru_id) %>% filter(yr %in% years) %>% @@ -104,6 +105,7 @@ plot_hru_pw_day <- function(sim_verify, hru_id, var, title = "", years = 1900:21 #' } plot_hru_var <- function(sim_verify, hru_id, var, period = "day", fn_summarize = "mean"){ + .Deprecated("plot_hru_pw") options(dplyr.summarise.inform = FALSE) df <- sim_verify$hru_pw_day[sim_verify$hru_pw_day$unit %in% hru_id, c("unit", "yr", "mon", "day", var)] ##Aggregating data by time step diff --git a/R/print_mgt.R b/R/print_mgt.R index c10c21d..cca9eb5 100644 --- a/R/print_mgt.R +++ b/R/print_mgt.R @@ -52,6 +52,7 @@ print_triggered_mgt <- function(sim_verify, hru_id, years = 1900:2100) { #' @importFrom purrr map #' @importFrom stringr str_sub str_remove #' @importFrom readr write_delim write_lines +#' @importFrom stats lag #' #' @export #' -- GitLab