Learn R Programming

scidb (version 1.2-0)

replaceNA: Replace SciDB NULL values with another value.

Description

Replace SciDB NULL (aka missing) values with another value.

Usage

replaceNA (x, value, `attribute`, `eval`=FALSE, ...)

Arguments

x
A scidb or scidbdf object.
value
An optional scidb array containing the replacement value.
attribute
An optional attribute to restrict NULL replacement to.
eval
(Optional) If true, execute the query and store the reult array. Otherwise defer evaluation.
...
Optional arguments.

Value

A new scidb or scidbdf object.

Details

This R function corresponds to SciDB's substitute operator.

If value is missing, a value of numeric zero, false, or the string "0" will be used to replace NULL values depending on the replacement attribute type.

If attribute is missing, then an attempt will be made to replace all NULL values in the array.

See Also

scidb

Examples

Run this code
## Not run: 
# x <- scidb("build(<v:double null>[i=1:3,3,0],'{1}[(null),(null),(null)]',true)")
# y <- replaceNA(x)
# ## End(Not run)

Run the code above in your browser using DataLab