Skip to content

[CFFDRS R Bug]: Poor stop condition, reformat to all #35

Description

@BadgerOnABike

Contact Details

No response

What happened?

Currently using sort to determine if any falsey conditions exist, all would be superior

cffdrs_r/R/fbpRaster.r

Lines 342 to 357 in 23dc442

if (output == "SECONDARY" | output == "S") {
if (!sort(select %in% secondaryNames)[1]) {
stop("Selected variables are not in the outputs")
}
}
if (output == "PRIMARY" | output == "P") {
if (!sort(select %in% primaryNames)[1]) {
stop("Selected variables are not in the outputs")
}
}
if (output == "ALL" | output == "A") {
if (!sort(select %in% allNames)[1]) {
stop("Selected variables are not in the outputs")
}
}
}

Relevant log output

No response

Approvals Process

  • Testing For Issue
  • Merge

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions