Description Usage Arguments Details Value Author(s) See Also Examples
These functions open a connection to a Causata server, extract data, and close the connection.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Connect(sql.server.host, sql.server.port, sql.username, sql.password,
group=NULL, verbose=FALSE)
## S3 method for class 'Connect'
GetData(conn, query, ...)
## S3 method for class 'Connect'
GetCausataData(conn, query, dependent.variable, ...)
## S3 method for class 'Connect'
GetRawData(conn, query, ...)
## S3 method for class 'CausataData'
GetQuery(this, ...)
## S3 method for class 'Connect'
GetNames(this, kind, ...)
## S3 method for class 'Connect'
Close(conn, ...)
|
sql.server.host |
The SQL server hostname. Contact your Causata Engagement Manager for the correct value. |
sql.server.port |
The SQL server port. Contact your Causata Engagement Manager for the correct value. |
sql.username |
Your Causata username. Contact your Causata Engagement Manager for the correct value. |
sql.password |
Your Causata password. Contact your Causata Engagement Manager for the correct value. |
group |
Configuration data from the group provided will be loaded from the configuration file. See |
verbose |
If TRUE then the connection information will be printed to the screen. |
conn |
A connection object from |
query |
A query object from |
this |
A |
kind |
The kind of variable name to return, valid values are |
dependent.variable |
See |
... |
Unused arguments for other methods. |
Connect
opens a SQL connection to a Causata server using functions from the RMySQL
package.
GetData
executes the provided query and returns data in a data frame.
GetCausataData
executes the provided query and returns data in a CausataData
object.
GetRawData
returns unaltered data from the lower level query commands.
Close
simply closes a database connection.
GetData
and GetRawData
return data encoded in different formats using the Causata SQL interface.
GetData
is consistent with Causata data exported into CSV files, so it should generally be used instead of
GetRawData
.
The default behavior when using SQL queries of Causata within R
is that boolean data in Causata is returned as numeric (1=TRUE, 0=FALSE), and text data is returned as
characters. The other functions, GetData
and GetCausataData
, convert boolean data to
factors with level names "true" and "false", and return character data as factors. This is the same format
as data exported from Causata to CSV files.
GetNames
is used to return the system names or display names for Causata variables.
Connect
returns an object of class Connect
. GetData
and GetRawData
return
data frames, while GetCausataData
returns an object of class CausataData
.
Finally, GetNames
returns a character vector of variable names.
David Barker <support@causata.com>
Connect
, Query
, CausataData
,
RMySQL
, LoadCausataConfig
.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.