I\'d like to avoid having many checks like the following in my code:
myObj.someStringField = rdr.IsDBNull(someOrdinal) ? string.
You can easily define such function and use it then:
ifnull <- function(x,y) { if(is.na(x)==TRUE) return (y) else return (x); }
or same minified version:
ifnull <- function(x,y) {if(is.na(x)==TRUE) return (y) else return (x);}