Connect to a SciDB database
1 2 3 4
optional host name or I.P. address of a SciDB shim service to connect to
optional port number of a SciDB shim service to connect to. For connecting
to Shim when the Shim port is forwarded, use
optional authentication username
optional authentication password
optional SciDB authentication type
optional shim protocol type
logical value, if
optional AFL operator/macro documentation (see notes)
A scidb connection object. Use
$ to access AFL operators
ls() on the returned object to list SciDB arrays,
names() on the returned object to list all available AFL operators
Use the optional
password arguments with
auth_type set to "digest" to use HTTP digest authentication (see the
shim documentation to configure this). Digest authentication may use either
"http" or "https" selected by the
auth_type = "scidb" to use SciDB authentication, which only
works over "https".
Use the returned SciDB connection object (of class
afl) with other
package functions to interact with SciDB arrays. Apply R's
function on the returned value to see a list of arrays. The returned value
contains a list of available SciDB AFL language operators and macro names.
Use the dollar-sign function to accesss those functions.
doc argument may be a three-column data frame with
character-valued columns name, signature, and help containing AFL operator
names, function signatures, and help strings, respectively. See
'data("operators", package="scidb")' for an example.
Forwarded Shim port: Shim usually runs on a selected port e.g. 8080 or 8083
(for secure communication) and those ports need to be opened up to clients. In
other situations, the admin might decide to not open the Shim port and
instead forward the Shim port to a URL like https://hostname/shim/.
In this case, we do not need to supply the port
scidbconnect(); instead one should use
port = NULL
All arguments support partial matching.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
## 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. ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.