Skip to content

Commit 720f9a0

Browse files
committed
style: prefer isTRUE checks in cellosaurus helpers
1 parent 5bee4e9 commit 720f9a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/cellosaurus.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#'
1717
#' @export
1818
cellosaurus_fields <- function(common = FALSE, upper = FALSE) {
19-
if (common == TRUE) {
19+
if (isTRUE(common)) {
2020
fields <- c(
2121
"id",
2222
"ac",
@@ -46,7 +46,7 @@ cellosaurus_fields <- function(common = FALSE, upper = FALSE) {
4646
fields <- schema$components$schemas$Fields$enum
4747
}
4848

49-
if (upper == TRUE) {
49+
if (isTRUE(upper)) {
5050
fields <- toupper(fields)
5151
} else {
5252
fields <- tolower(fields)
@@ -364,7 +364,7 @@ mapCell2Accession <- function(
364364
fixed = TRUE,
365365
value = TRUE
366366
)
367-
if (isTRUE(length(discontinued) > 0L)) {
367+
if (length(discontinued) > 0L) {
368368
discontinued <- sub(
369369
pattern = "^Discontinued: (.+);.+$",
370370
replacement = "\\1",

0 commit comments

Comments
 (0)