ds.histogram: Generates a histogram plot

Description Usage Arguments Details Value Author(s) Examples

Description

This function plots a histogram without outliers.

Usage

1
ds.histogram(x = NULL, type = "combine", datasources = NULL)

Arguments

x

a charcater, the name of the vector of values for which the histogram is desired.

type

a character which represent the type of graph to display. If type is set to 'combine', a histogram that merges the single plot is displayed. Each histogram is plotted separately if If type is set to 'split'.

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

It calls a datashield server side function that produces the histogram objects to plot. The objects to plot do not contain bins with counts smaller than the allowed threshold. The function allows for the user to plot disctinct histograms (one for each study) or a combine histogram that merges the single plots.

Value

one or more histogram objects and plots depending on the argument type

Author(s)

Gaye, A.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{

  # load that contains the login details
  data(logindata)

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

  # Example 1: plot a combined histogram of the variable 'LAB_TSC'  default behaviour
  ds.histogram(x='D$LAB_TSC')

  # Example 2: Plot the histograms of LAB_TSC separately (one per study)
  ds.histogram(x='D$LAB_TSC', type='split')

  # Example 2: plot a combined histogram of the variable 'LAB_HDL'  default behaviour
  ds.histogram(x='D$LAB_HDL')

  # Example 3: plot the histograms of LAB_HDL separately (one per study)
  ds.histogram(x='D$LAB_HDL', type='split')

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

}

datashield/dsGraphicsClient documentation built on May 14, 2019, 7:50 p.m.