Learn R Programming

scidb (version 3.0.0)

scidbconnect: Connect to a SciDB database

Description

Connect to a SciDB database

Usage

scidbconnect(
  host = getOption("scidb.default_shim_host", "127.0.0.1"),
  port = getOption("scidb.default_shim_port", 8080L),
  username,
  password,
  auth_type = c("scidb", "digest"),
  protocol = c("http", "https"),
  admin = FALSE,
  int64 = FALSE,
  doc
)

Arguments

host

optional host name or I.P. address of a SciDB shim service to connect to

port

optional port number of a SciDB shim service to connect to. For connecting to Shim when the Shim port is forwarded, use port= NULL (see detailed note below).

username

optional authentication username

password

optional authentication password

auth_type

optional SciDB authentication type

protocol

optional shim protocol type

admin

Set to TRUE to open a higher-priority session. This is identical with the --admin flag for the iquery SciDB client (default FALSE)

int64

logical value, if TRUE then preserve signed 64-bit SciDB integers as R integer64 values from the bit64 package. Otherwise, 64-bit integers from SciDB are converted to R double values, possibly losing precision.

doc

optional AFL operator/macro documentation (see notes)

Value

A scidb connection object. Use $ to access AFL operators and macros, ls() on the returned object to list SciDB arrays, and names() on the returned object to list all available AFL operators and macros.

See Also

scidb_prefix

Examples

Run this code
# NOT RUN {
db <- scidbconnect()

# SciDB 15.12 authentication example (using shim's default HTTPS port 8083)
db <- scidbconnect(user="root", password="Paradigm4",
                   auth_type="scidb", port=8083, protocol="https")

# List available AFL operators
names(db)

# List arrays
ls(db)

# Explicitly upload an R matrix to SciDB:
x <- as.scidb(db, matrix(rnorm(20), 5))
# Implicitly do the same as part of an AFL expression
y <- db$join(x,  as.scidb(matrix(1:20, 5)))
print(y)

as.R(y)   # Download a SciDB array to R.
# }

Run the code above in your browser using DataLab