ds.corTest: Tests for correlation between paired samples

Description Usage Arguments Details Value Author(s) Examples

Description

This is similar to the R base function 'cor.test'.

Usage

1
ds.corTest(x = NULL, y = NULL, datasources = NULL)

Arguments

datasources

a list of opal object(s) obtained after login in to opal servers; these objects hold also the data assign to R, as dataframe, from opal datasources.

x

a character, the name of a numerical vector

y

a character, the name of a numerical vector

Details

Runs a two sided pearson test with a 0.95 confidence level.

Value

a list containing the results of the test

Author(s)

Gaye, A.; Burton, P.

Examples

 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)

}

datashield/dsStatsClient documentation built on May 14, 2019, 7:52 p.m.