nn: Replace NULL with character()

Description Usage Arguments Value Note Author(s) Examples

Description

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

Usage

1
nn(x)

Arguments

x

Input variable

Value

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

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2017) ranghetti.l@irea.cnr.it

Examples

1
2
3
4
5
6
## Not run: 
basename(NULL) # error
basename(character()) # ok
basename(nn(NULL)) # ok

## End(Not run)

pobsteta/theia2r documentation built on May 25, 2019, 2:21 p.m.