Description Usage Arguments Details Value Author(s) Examples
This is similar to the R base function 'cor.test'.
1 | ds.corTest(x = NULL, y = NULL, datasources = NULL)
|
datasources |
a list of opal object(s) obtained
after login in to opal servers; these objects hold also
the data assign to R, as |
x |
a character, the name of a numerical vector |
y |
a character, the name of a numerical vector |
Runs a two sided pearson test with a 0.95 confidence level.
a list containing the results of the test
Gaye, A.; Burton, P.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | {
# load that contains the login details
data(logindata)
# login and assign specific variable(s)
# (by default the assigned dataset is a dataframe named 'D')
myvar <- list('LAB_TSC', 'LAB_HDL')
opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)
# test for correlation between the variables 'LAB_TSC' and 'LAB_HDL'
ds.corTest(x='D$LAB_TSC', y='D$LAB_HDL')
# clear the Datashield R sessions and logout
datashield.logout(opals)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.