isReadableValue: Is Readable Value

Description Usage Arguments Value Functions Examples

View source: R/isReadableValue.R

Description

Use this method to prevent failures from NULL, NA, or empty values.

Usage

1
2
3

Arguments

value

usually the value of a property or a user response.

Value

a single boolean. Return FALSE if value is NULL, NA, empty vector/list or empty string; otherwise return TRUE.

boolean. Return FALSE if value is NULL, NA, empty vector/list or empty string; otherwise return TRUE.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
hasReadableValue(NA)
#> FALSE
hasReadableValue(c())
#> FALSE
hasReadableValue("")
#> FALSE
hasReadableValue("text")
#> TRUE
# hasReadableValue(c(1,2,3,NA,4))
# #> TRUE
# hasReadableValue(list(a=c(1,2,NA), b=c("app"), c=NA, d=""))
# #> TRUE

isReadableValue(NA)
#> FALSE
isReadableValue(c())
#> FALSE
isReadableValue("")
#> FALSE
isReadableValue("text")
#> TRUE
# isReadableValue(c(1,2,3,NA,4))
# #> TRUE  TRUE  TRUE FALSE  TRUE
# isReadableValue(list(a=c(1,2,NA), b=c("app"), c=NA, d=""))
# #> $a
# #> [1]  TRUE  TRUE FALSE
# #> $b
# #> [1] TRUE
# #> $c
# #> [1] FALSE
# #> $d
# #> [1] FALSE

BioLockJ-Dev-Team/BioLockR documentation built on March 9, 2021, 10:43 p.m.