From 0b2ed1a31a015c825fa1feaece284f96d58867c4 Mon Sep 17 00:00:00 2001 From: aheinri5 <Anna@netzkritzler.de> Date: Wed, 6 Jan 2021 18:57:52 +0100 Subject: [PATCH] [docs] added missing roxygen docs --- R/prj_medium.R | 4 ++++ R/prj_porous_medium.R | 25 +++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/R/prj_medium.R b/R/prj_medium.R index 39eb2c9..d216c01 100644 --- a/R/prj_medium.R +++ b/R/prj_medium.R @@ -13,6 +13,10 @@ r2ogs6_medium <- function(phases = NULL, properties = NULL, id = NULL) { + if(is.character(phases)){ + phases <- NULL + } + new_r2ogs6_medium(phases, properties, id) diff --git a/R/prj_porous_medium.R b/R/prj_porous_medium.R index d0a8229..d23a6d7 100644 --- a/R/prj_porous_medium.R +++ b/R/prj_porous_medium.R @@ -172,12 +172,12 @@ new_r2ogs6_capillary_pressure <- function(type, #'r2ogs6_relative_permeability #'@description tag: relative_permeability -#'@param id -#'@param type -#'@param sr -#'@param smax -#'@param m -#'@param krel_min +#'@param type string: +#'@param sr string | number: +#'@param smax string | number: +#'@param m string | number: +#'@param krel_min string | number: +#'@param id string: Optional: r2ogs6_relative_permeability <- function(type, sr, smax, @@ -187,6 +187,11 @@ r2ogs6_relative_permeability <- function(type, # Add coercing utility here + sr <- coerce_string_to_numeric(sr) + smax <- coerce_string_to_numeric(smax) + m <- coerce_string_to_numeric(m) + krel_min <- coerce_string_to_numeric(krel_min) + new_r2ogs6_relative_permeability(type, sr, smax, @@ -202,6 +207,14 @@ new_r2ogs6_relative_permeability <- function(type, m, krel_min, id = NULL) { + validate_is_string(type) + validate_is_null_or_string(id) + + validate_is_number(sr, + smax, + m, + krel_min) + structure(list(type = type, sr = sr, smax = smax, -- GitLab