sdcConnect
Import Data from a Spotfire Data Connection

Description

Imports data from a Spotfire Data Connection.

Usage

sdcConnect(url, user="", password="")
sdcGetInfo(conn, path)
sdcGetData(conn, path, ..., parameters=NULL,
           view=NULL, maxRows=NULL, file=NULL)

Arguments

url a character string specifying the URL of a Spotfire Web Player to access. This is normally a full URL; for example, "http://srvtest04/SpotfireWeb".
user a character string specifying the user name to log in to the Spotfire Web Player.
password a character string specifying the user password to log in to the Spotfire Web Player.
conn an object returned by sdcConnect that specifies the Spotfire Web Player to access.
path a character string specifying the path to a data connection on the server.
... Any number of named parameters specified to access the data connection.
parameters If this argument is given, it is used to specify the parameter names and values, rather than the contents of the ... arguments. This argument allows using parameters with the same names as the arguments to sdcGetData.
view a character string specifying the view name of the data connection. This must be specified only if the data connection has more than one view.
maxRows an integer giving the maximum number of rows to retrieve. If it is NULL or less than one, all of the data rows are retrieved. This value can be ignored for some types of Spotfire data connections.
file if this argument is given, it must be a file name where the retrieved data is stored in the SBDF file format. If it is not given, the retrieved data is returned as a data.frame.

Details

These functions support importing data from a Spotfire Data Connection or an Information Link by accessing a Spotfire Web Player server.
Value
sdcConnectreturns a SpotfireDataConnection object that identifies a particular Spotfire Web Player.
sdcGetInforeturns a SpotfireDataConnectionInfo object containing information about the views and parameters of a specified data connection.
sdcGetDatareturns a data.frame with the retrieved data (unless file is specified, in which case it returns NULL).
See Also
importDataFromSBDF.
Examples
## Not run: 
# Connect to a Web Player
conn <- sdcConnect("http://myServer/SpotfireWeb", "myname", "mypassword")

# Retrieve and print info about a data connection print(sdcGetInfo(conn, "/MyFolder/SalesWithParameters")) ## Spotfire data connection info ## server: http://myServer/SpotfireWeb ## path: /MyFolder/SalesWithParameters ## 1 view ## ## Spotfire data connection view: "SalesWithParameters" ## Parameters: ## Name DataType Required AllowMultipleValues IsRangeValues ## 1 Region String TRUE TRUE FALSE ## 2 Sales Total SingleReal TRUE TRUE TRUE ## 3 ShipContains String TRUE FALSE FALSE

# Retrieve data with specified parameters, # where parameter "Sales Total" specifies the range 100 to 300, # and the other parameters are strings. salesData <- sdcGetData(conn, "/MyFolder/SalesWithParameters", Region="WEST", "Sales Total"=c(100,300), ShipContains="SMALL") ## End(Not run)

Package SpotfireData version 6.1.1-7
Package Index