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 set.

Note

Updated 2019-08-10.

Examples

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