Check the compress formal argument

formalCompress(compress)

Arguments

compress

logical(1) or character(1). These character strings are currently allowed for save(): "gzip", "bzip2", or "xz".

Value

TRUE on success; FALSE on failure, with cause attribute set.

Examples

## TRUE ==== formalCompress("gzip")
#> [1] TRUE
formalCompress(TRUE)
#> [1] TRUE
## FALSE ==== formalCompress(NA)
#> [1] FALSE #> Cause of failure: #> compress is not a boolean flag (TRUE/FALSE).
formalCompress("xxx")
#> [1] FALSE #> Cause of failure: #> compress has elements not in c("bzip2", "gzip", "xz"): xxx