ds.log: Computes logarithms, by default natural logarithms

Description Usage Arguments Details Value Author(s) Examples

Description

This function is similar to R function log.

Usage

1
2
ds.log(x = NULL, base = exp(1), newobj = NULL, checks = FALSE,
  datasources = NULL)

Arguments

x

a vector.

base

a numrical, the base with respect to which logarithms are computed.

newobj

the name of the new variable. If this argument is set to NULL, the name of the new variable is the name of the input variable with the suffixe '_log' (e.g. 'LAB_TSC_log', if input variable's name is 'LAB_TSC')

checks

a boolean, if TRUE (default) checks that verify elements on the server side such checks lengthen the run-time so the default is FALSE and one can switch these checks on (set to TRUE) when faced with some error(s).

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

this is simply a wrapper for the server side function.

Value

nothing is returned to the client, the new object is stored on the server side.

Author(s)

Gaye, A.; Isaeva, J.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{

  # load that contains the login details
  data(logindata)

  # login and assign specific variable(s)
  myvar <- list("LAB_TSC")
  opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)

  # Compute natural logarithm of LAB_TSC
  ds.log(x='D$LAB_TSC')

  # clear the Datashield R sessions and logout
  datashield.logout(opals) 

}

paularaissa/dsTutorialClient documentation built on May 29, 2019, 7:36 a.m.