Learn R Programming

scidb (version 1.1-2)

bind: bind

Description

The bind function is a wrapper to the SciDB `apply` operator. We chose the name `bind` as this function most closely matches the concept of the R cbind function in data frame contexts.

Similarly to cbind, the bind function adds a new variable (a.k.a. SciDB `attribute`) to a SciDB array.

Usage

bind(X, name, FUN, eval)

Arguments

X
A scidb or scidbdf object
name
A character name for the new attribute
FUN
A SciDB function or expression that defines the values for the new attribute (character)
eval
(Optional) If true, execute the query and store the reult array. Otherwise defer evaluation.

Value

  • A scidbdf object.

See Also

scidb

Examples

Run this code
x <- as.scidb(iris)
y <- bind(x, "prod", "Petal_Length * Petal_Width")

# The new scidbdf object y contains a new variable named 'prod':
print(head(y))

Run the code above in your browser using DataLab