ag.ds.histogram: Plots a histogram

Description Usage Arguments Value Author(s) Examples

Description

This function plots histogram of the given data values. It calls a datashield server side function that produces the histogram objects to plot. The objects to plot do not contain bins with counts < 5. The function allows for the user to plot disctinct histograms (one for each study) or a combine histogram that merges the single plots.

Usage

1
2
  ag.ds.histogram(opals = opals, xvect = NULL,
    type = "combine")

Arguments

opals

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.

xvect

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'.

Value

one or more histogram plot 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
{

# load that contains the login details
data(logindata)

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

# Example 1: plot a combined histogram of the variable 'LAB_TSC' - default behaviour
ag.ds.histogram(opals=opals, xvect=quote(D$LAB_TSC))

# Example 2: Plot the histograms separately (one per study)
 ag.ds.histogram(opals=opals, xvect=quote(D$LAB_TSC), type="split")

# Example 3: Plot the histograms of the first and second study
 ag.ds.histogram(opals=opals[1:2], xvect=quote(D$LAB_TSC), type="split")

# Example 4: Plot the histogram of the third study only
 ag.ds.histogram(opals=opals[3], xvect=quote(D$LAB_TSC), type="split")
}

datashield/ag.dev.cl documentation built on May 14, 2019, 7:46 p.m.