ds.corTest {dsBaseClient}R Documentation

Tests for correlation between paired samples

Description

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

Usage

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

Arguments

x

a character, the name of a numerical vector

y

a character, the name of a numerical vector

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.

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

## Not run: 

  # 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)


## End(Not run)


[Package dsBaseClient version 5.0.0 ]