Internal function: return character(0) instead of NULL. This is sometimes needed not to return error when applying some functions.

nn(x)

Arguments

x

Input variable

Value

character(0) if x==NULL, x elsewhere

Note

License: GPL 3.0

Examples

tryCatch(basename(NULL), error = print) # error
#> <simpleError in basename(NULL): richiesti argomenti di tipo vector>
#> character(0)
basename(sen2r:::nn(NULL)) # ok
#> character(0)