unbound: Get the object representing an unbound variable

Description Usage Value Author(s) See Also Examples

View source: R/zzz.R

Description

This retrieves the built-in R object representing the value of an unbound variable, i.e. an undefined value. This can be returned by the dbread method of an object table if it does not have a definition for the requested variable. This makes it easy to handle such cases in the R code rather than in the underlying C-level interface that glues the internal engine and the user-level object table implementations.

Usage

1

Value

Returns the internal C-level value of R_UnboundValue.

Author(s)

Duncan Temple Lang <[email protected]>

See Also

dbread

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  dbread.FixedList <-
  function(database, name) {
     if(is.na(name, match(names(database$elements))))
       return(unbound())

     return(database$elements[[name]])
  }

## End(Not run)

jeroenooms/RObjectTables documentation built on May 17, 2017, 6:16 p.m.