Learn R Programming

scidb (version 1.1-2)

scidbremove: Remove an array.

Description

Remove (delete) an array from SciDB.

Usage

scidbremove(x, error = warning, async, force, warn=TRUE, recursive=FALSE)

Arguments

x
The name of the SciDB array to remove (character), or a vector of array names to remove, or a scidb or scidbdf object.
error
Error handling function.
async
(Optional) logical: If TRUE, use async option in newer versions of SciDB shim interface to return faster by not waiting for the query to complete. The default value is FALSE.
force
(Optional) logical: If TRUE, force removal of specified array, even if the scidb.safe_remove option is set to TRUE.
warn
(Optional) logical: Set to FALSE to disable warnings during removal.
recursive
(Optional) logical: If true, remove the entire dependency graph of this array from SciDB.

Value

  • NULL is invisibly returned. SciDB errors are returned as normal R errors and may be handled accordingly.

Details

Supply a user-defined error handling function to avoid stopping on error (for example trying to delete a non-existing array). For example, use error=warning to covert errors to warnings but still report them.

The package option scidb.safe_remove adds some protection for accidentally removing arrays. When TRUE (the default value), only temporary arrays associated with the current R session can be removed without also setting the force option. Specify force=TRUE to remove any specified array, or optionally set the options(scidb.safe_remove=FALSE) to disable this safety check.

The async option does not really do anything yet. It will in a future version.

Use recursive=TRUE with great care. It recursively calls scidbremove on the entire dependency graph of an array object.

Examples

Run this code
data("iris")
x = as.scidb(iris)
# This is the SciDB array name corresponding to x:
print(x@name)

# Let's make an array with a different name:
y = as.scidb(iris, name="iris")
print(y@name)

# Removing everything will only delete arrays whose name begin with
# R_array by default:
scidbremove(scidblist())
scidblist()

# To remove the 'iris' array, use force=TRUE:
scidbremove("iris", force=TRUE)
scidblist()

Run the code above in your browser using DataLab