View source: R/get-anon-plot-data.R
dh.getAnonPlotData | R Documentation |
Whilst DataSHIELD has basic plotting functionality, for publications you may need more flexiblity in creating plots. This function calls server-side functions which create an anonymised copy of the data, and returns this data in a client-side object. These values can then be used to create plots (e.g with ggplot2).
dh.getAnonPlotData(
df = NULL,
var_1 = NULL,
var_2 = NULL,
conns = NULL,
checks = TRUE
)
df |
Character specifying a server-side data frame. |
var_1 |
Character giving the name of a column within 'df' for which to extract anonymised data. |
var_2 |
Optionally, character specifying a second column within 'df'. If a column is specified then scatter plot data will be returned with 'var_1' as the explanatory variable and 'var_2' as the outcome variable. Default is NULL which returns anonymised data only for 'var_1'. |
conns |
DataSHIELD connections object. |
checks |
Logical; if TRUE checks are performed prior to running the function. Default is TRUE. |
This function can return two types of anonymised data: either anonymised data for a single variable, or scatter-plot data for two variables.
A tibble in long format containing columns 'cohort', 'var_1' and optionally 'var_2'. The values for 'var1' and 'var_2' are the anonymised data points.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.