Skip to content

Commit

Permalink
fix: lintr annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
gisler committed Dec 26, 2023
1 parent a755980 commit ea58517
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/RPhosFate.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ setMethod(
x@erosion@rl_LFa <- lapp(
c(x = rl_acc_wtd_ovl, y = rl_LFa_m),
fun = function(x, y) {
((x * is_res)^(1 + y) - ((x - 1) * is_res)^(1 + y)) / # nolint
((x * is_res)^(1 + y) - ((x - 1) * is_res)^(1 + y)) /
(is_res * 22.13^y)
},
cores = x@is_ths
Expand Down
6 changes: 3 additions & 3 deletions R/input.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ DEMrelatedInput <- function(
ls_tmp = FALSE
) {
if (!requireNamespace("whitebox", quietly = TRUE) ||
packageVersion("whitebox") < package_version("2.0.0")) {
packageVersion("whitebox") < package_version("2.0.0")) {
stop(
'Package "whitebox" (v2.0.0 or higher) must be installed for this ',
"functionality.",
Expand Down Expand Up @@ -403,14 +403,14 @@ DEMrelatedInput <- function(
}

if (!is.null(cs_rds)) {
rl_dir_rds <- lapp(
lapp(
c(
x = rl_dir_tau,
y = rast("cha.tif"),
z = rl_rds
),
fun = function(x, y, z) {
ifelse(is.na(y), ifelse(is.na(z), x, NA_integer_), x)
ifelse(is.na(y), ifelse(is.na(z), x, NA_integer_), x) # nolint
},
cores = is_ths,
filename = "dir_tau_rds.tif",
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ slots2list <- function(parameters) {

writeLayer <- function(cmt, layer, rl, datatype, substance = NULL) {
if (length(cmt@is_MCi) == 0L || (length(cmt@is_MCi) == 1L &&
layer %in% cmt@cv_MCl)) {
layer %in% cmt@cv_MCl)) {
if (!is.null(substance)) {
layer <- sub("^xx", tolower(substance), layer)
}
Expand Down
2 changes: 1 addition & 1 deletion inst/tinytest/test_gettersSetters.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ x <- RPhosFate(
ls_ini = TRUE
)

source("parameters.R", local = TRUE) # nolint
source("parameters.R", local = TRUE)

#### getLayer and [ extract operator ####
layers <- list.files(
Expand Down
2 changes: 1 addition & 1 deletion inst/tinytest/test_highLevelInterface.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ x <- RPhosFate(
ls_ini = TRUE
)

source("parameters.R", local = TRUE) # nolint
source("parameters.R", local = TRUE)

#### RPhosFate and catchment ####
y <- do.call(RPhosFate, parameters)
Expand Down

0 comments on commit ea58517

Please sign in to comment.