From 4c8fbe62d033430a8840833d3200e3839424ad27 Mon Sep 17 00:00:00 2001 From: Dimitri Falk Date: Sun, 3 Mar 2024 14:23:35 +0100 Subject: [PATCH] doc(*): assertions --- R/calc_designstorm.R | 3 --- R/get_depth.R | 2 -- R/get_returnp.R | 1 - 3 files changed, 6 deletions(-) diff --git a/R/calc_designstorm.R b/R/calc_designstorm.R index c028c07..8728903 100644 --- a/R/calc_designstorm.R +++ b/R/calc_designstorm.R @@ -34,15 +34,12 @@ calc_designstorm <- function(x = NULL, checkmate::assert_tibble(x) allowed_d <- attr(x, "durations_min") - checkmate::assert_numeric(d, len = 1) checkmate::assert_choice(d, allowed_d) allowed_tn <- attr(x, "returnperiods_a") - checkmate::assert_numeric(tn, len = 1) checkmate::assert_choice(tn, allowed_tn) allowed_type <- c("EulerI", "EulerII") - checkmate::assert_character(type, len = 1) checkmate::assert_choice(type, allowed_type) # pre-processing ------------------------------------------------------------- diff --git a/R/get_depth.R b/R/get_depth.R index a85464e..0d27c42 100644 --- a/R/get_depth.R +++ b/R/get_depth.R @@ -34,11 +34,9 @@ get_depth <- function(x = NULL, checkmate::assert_tibble(x) allowed_d <- attr(x, "durations_min") - checkmate::assert_numeric(d, len = 1) checkmate::assert_choice(d, allowed_d) allowed_tn <- attr(x, "returnperiods_a") - checkmate::assert_numeric(tn, len = 1) checkmate::assert_choice(tn, allowed_tn) checkmate::assert_logical(uc) diff --git a/R/get_returnp.R b/R/get_returnp.R index 3f006f8..99a0b9b 100644 --- a/R/get_returnp.R +++ b/R/get_returnp.R @@ -41,7 +41,6 @@ get_returnp <- function(x = NULL, checkmate::assert_numeric(hn, len = 1, lower = 0) allowed_d <- attr(x, "durations_min") - checkmate::assert_numeric(d, len = 1) checkmate::assert_choice(d, allowed_d) checkmate::assert_logical(interpolate)