Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
74abd9a
Initial version of dsBaseClient test suite workflow
villegar Sep 18, 2025
8ec1863
Add steps from the armadillo_azure-pipelines workflow
villegar Sep 18, 2025
ba26785
Remove step to modify .Rprofile file, replace the installation step f…
villegar Sep 18, 2025
e3ab449
Remove duplicated environment variable
villegar Sep 18, 2025
937802e
Swap steps for installating dependencies
villegar Sep 18, 2025
013e781
Update container's name: dsbaseclient_armadillo_1 >>> dsbaseclient-ar…
villegar Sep 18, 2025
d43f31f
Change default value for TEST_FILTER and add steps to capture results…
villegar Sep 18, 2025
b56370e
Add step to install additional dependencies, mostly for the processin…
villegar Sep 18, 2025
8e6a1ab
Update step to carry on even when test failures are identified
villegar Sep 18, 2025
4c16896
Switch ingestion to 'mysql'
StuartWheater Sep 18, 2025
5747ede
Replace committing results to testStatus and creating an intermediate…
villegar Sep 18, 2025
73091dc
Update path to output logs from dsBase to dsBaseClient
villegar Sep 18, 2025
e1a0310
Update path to output files
villegar Sep 18, 2025
68e3a55
Updated lemon-donkey with RC5
StuartWheater Sep 19, 2025
5a6410d
Switch to 'mongodb'
StuartWheater Sep 19, 2025
d5707a2
Switched Armadillo 5.9.1
StuartWheater Sep 19, 2025
4becd05
Update with 6.3.4
StuartWheater Sep 21, 2025
78d3b4d
Merge pull request #613 from villegar/v6.3.5-dev
villegar Sep 21, 2025
56777d8
Merge branch 'datashield:v6.3.5-dev' into v6.3.5-dev
StuartWheater Sep 29, 2025
6d0e19e
Update to Armadillo 5.9.4
StuartWheater Sep 29, 2025
354de0c
Updated 'armadillo_azure-pipeline.csv'
StuartWheater Sep 29, 2025
c954c7e
ds.mice check pased on driver
StuartWheater Sep 29, 2025
cb70487
Updated 'armadillo_hp-laptop_quay' profile
StuartWheater Sep 29, 2025
7bf31e6
Updated 'armadillo_hp-laptop_quay.csv'
StuartWheater Sep 29, 2025
330d270
Updated 'opal_azure-pipeline'
StuartWheater Oct 1, 2025
1224d68
Update 'default_perf_profile'
StuartWheater Oct 1, 2025
816fc5d
Removed testStatus
StuartWheater Oct 3, 2025
d762373
Update to align with V6.3.5 dev changes
StuartWheater Oct 6, 2025
39949a9
removed clientside checks
timcadman Oct 9, 2025
bdb5476
test: written tests for unhappy flow
timcadman Oct 9, 2025
9160862
Updates for context() + copyright
StuartWheater Oct 26, 2025
1a5bc41
New puild packages
StuartWheater Oct 27, 2025
e6c1797
Update version
StuartWheater Oct 27, 2025
77e939e
Update file names
StuartWheater Oct 27, 2025
ed1bd92
Merge pull request #619 from StuartWheater/v6.3.5-dev-feat/testthat-r…
StuartWheater Oct 28, 2025
fe012e4
Merge pull request #618 from StuartWheater/v6.3.5-dev
StuartWheater Oct 28, 2025
3f39334
feat: ds.mdPattern fct
ESCRI11 Oct 28, 2025
2105be0
Merge pull request #620 from datashield/v6.3.5-dev-feat/testthat-rework
StuartWheater Oct 28, 2025
d206026
Merge branch 'v7.0-dev-feat/performance' into v6.3.5-dev
StuartWheater Oct 29, 2025
e2c190d
Documentation update
StuartWheater Oct 30, 2025
528f8aa
Merge pull request #623 from StuartWheater/v6.3.5-dev
StuartWheater Oct 30, 2025
43d90e4
Changes required for dsBaseClient to be submitted to CRAN
StuartWheater Oct 31, 2025
42a02ca
Merge pull request #621 from ESCRI11/dev-task-14
StuartWheater Nov 2, 2025
80b69f4
Merge branch 'datashield:v6.3.5-dev' into v6.3.5-dev
StuartWheater Nov 3, 2025
73b6d78
Merge pull request #625 from StuartWheater/v6.3.5-dev
StuartWheater Nov 7, 2025
19f82d0
Update of 'rock' & 'rsever' images
StuartWheater Nov 13, 2025
d192759
Updated packages
StuartWheater Nov 13, 2025
f17fd8a
Fixed type
StuartWheater Nov 13, 2025
20c12de
Updated for new responses for 'foobar'
StuartWheater Nov 13, 2025
d33b4c4
Fixed quotes
StuartWheater Nov 14, 2025
366e8c5
Fix to 'ds.mdPattern' document and documentation regeneration
StuartWheater Nov 14, 2025
9694b00
Removed options call setting datashield.errors.print to TRUE, for the…
StuartWheater Nov 14, 2025
3a76f87
Fixes for 'ds.colnames'
StuartWheater Nov 14, 2025
4202a41
Merge pull request #626 from StuartWheater/v6.3.5-dev
StuartWheater Nov 14, 2025
3c2188c
Save and restore 'par' values
StuartWheater Nov 19, 2025
ca5274b
Fix version
StuartWheater Nov 21, 2025
7761ed1
Fix return and export
StuartWheater Nov 21, 2025
ddae0c7
Replaces print(..) and cat(...) to message(...)
StuartWheater Nov 21, 2025
0d4755d
par -> graphics::par
StuartWheater Nov 21, 2025
7e944fd
Fix mice result
StuartWheater Nov 21, 2025
40108ca
Removed '
StuartWheater Nov 21, 2025
584fa47
Remove dataBootstrapUnitTests.R
StuartWheater Nov 21, 2025
d2aff01
Fixed test of 'ds.listClientsideFunctions'
StuartWheater Nov 23, 2025
5cfa7c0
Added 'libudunits2-dev'
StuartWheater Nov 23, 2025
2bc1776
Merge pull request #633 from StuartWheater/v6.3.5-dev
StuartWheater Nov 24, 2025
70e36c8
Switched to 'dsBase_6.3.5-permissive.tar.gz' from 'dsBase_6.3.4-permi…
StuartWheater Nov 24, 2025
adb5c75
Merge branch 'v6.3.5-dev' of github.com:StuartWheater/dsBaseClient in…
StuartWheater Nov 24, 2025
92817c3
Merge pull request #634 from StuartWheater/v6.3.5-dev
StuartWheater Nov 24, 2025
10c7f46
Set time limit to 180m
StuartWheater Nov 25, 2025
269091e
Update timeout and update list of command line arguments when calling…
villegar Nov 26, 2025
8f29708
Update cron schedule
villegar Nov 26, 2025
8dbeb52
Export sessionInfo to text file
villegar Nov 26, 2025
9a77a9b
Merge pull request #636 from villegar/v6.3.5-dev
villegar Nov 27, 2025
074660a
Merge branch 'v6.3.5-dev' of github.com:StuartWheater/dsBaseClient in…
StuartWheater Nov 27, 2025
d634965
Fix typo in variable name
StuartWheater Nov 27, 2025
f31f694
Update 'perf' support
StuartWheater Nov 30, 2025
e941ad3
Merge pull request #637 from StuartWheater/v6.3.5-dev
StuartWheater Dec 1, 2025
86fc180
Start of Release Process 6.3.5
StuartWheater Dec 2, 2025
014c91f
Merge branch 'v6.3.5-dev' of github.com:StuartWheater/dsBaseClient in…
StuartWheater Dec 2, 2025
4bd76e3
Start of Release Process 6.3.5
StuartWheater Dec 2, 2025
ae57be8
Single quotes
StuartWheater Dec 7, 2025
fe2d7b8
Merge pull request #639 from StuartWheater/v6.3.5-dev
StuartWheater Dec 7, 2025
00e5141
Switch to 'armadillo_azure-pipeline' perf profile
StuartWheater Dec 8, 2025
eba1862
Merge branch 'datashield:v6.3.5-dev' into v6.3.5-dev
StuartWheater Dec 9, 2025
9054949
Fixed typos in example code
StuartWheater Dec 11, 2025
7140f79
Merge branch 'datashield:v6.3.5-dev' into v6.3.5-dev
StuartWheater Dec 11, 2025
eda7be4
Update perf profile
StuartWheater Dec 11, 2025
a609cb3
Merge branch 'v6.3.5-dev' into v6.3.5-dev
StuartWheater Dec 11, 2025
932f8c8
Update perf profile
StuartWheater Dec 11, 2025
d6da7a2
Update to perf profile
StuartWheater Dec 12, 2025
e03bdb8
Updated Opal Azure_Pipeline profile
StuartWheater Dec 12, 2025
70b467b
Addition of 'on.exit' for warn option
StuartWheater Dec 14, 2025
4279ef0
Merge pull request #641 from StuartWheater/v6.3.5-dev
StuartWheater Dec 14, 2025
6589423
Updated Armadillo Profile - Azure Pipeline
StuartWheater Dec 15, 2025
b33d01e
Updates for export of 'R/subsetHelper.R'
StuartWheater Dec 21, 2025
f3e8bf5
Update 'docs' and 'man'
StuartWheater Dec 21, 2025
5ccae10
Merge pull request #642 from StuartWheater/v6.3.5-dev
StuartWheater Dec 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
^R/secure.global.ranking.md$
^_pkgdown\.yml$
^docs$
^dsBase_6.3.4.tar.gz$
^dsBase_6.3.4-permissive.tar.gz$
^dsBase_6.3.5.tar.gz$
^dsBase_6.3.5-permissive.tar.gz$
^dsDanger_6.3.4.tar.gz$
^\.circleci$
^\.circleci/config\.yml$
Expand Down
247 changes: 247 additions & 0 deletions .github/workflows/dsBaseClient_test_suite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
################################################################################
# DataSHIELD GHA test suite - dsBaseClient
# Adapted from `armadillo_azure-pipelines.yml` by Roberto Villegas-Diaz
#
# Inside the root directory $(Pipeline.Workspace) will be a file tree like:
# /dsBaseClient <- Checked out version of datashield/dsBaseClient
# /dsBaseClient/logs <- Where results of tests and logs are collated
# /testStatus <- Checked out version of datashield/testStatus
#
# As of Sept. 2025 this takes ~ 95 mins to run.
################################################################################
name: dsBaseClient tests' suite

on:
push:
schedule:
- cron: '0 0 * * 6' # Weekly (on Saturdays @ 0.00)

jobs:
dsBaseClient_test_suite:
runs-on: ubuntu-latest
timeout-minutes: 180
permissions:
contents: read

# These should all be constant, except TEST_FILTER. This can be used to test
# subsets of test files in the testthat directory. Options are like:
# '*' <- Run all tests.
# 'asNumericDS*' <- Run all asNumericDS tests, i.e. all the arg, etc. tests.
# '*_smk_*' <- Run all the smoke tests for all functions.
env:
TEST_FILTER: '_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-'
_r_check_system_clock_: 0
WORKFLOW_ID: ${{ github.run_id }}-${{ github.run_attempt }}
PROJECT_NAME: dsBaseClient
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
REPO_OWNER: ${{ github.repository_owner }}
R_KEEP_PKG_SOURCE: yes
GITHUB_TOKEN: ${{ github.token || 'placeholder-token' }}

steps:
- name: Checkout dsBaseClient
uses: actions/checkout@v4
with:
path: dsBaseClient

- name: Checkout testStatus
if: ${{ github.actor != 'nektos/act' }} # for local deployment only
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_OWNER }}/testStatus
ref: master
path: testStatus
persist-credentials: false
token: ${{ env.GITHUB_TOKEN }}

- name: Uninstall default MySQL
run: |
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
sudo service mysql stop || true
sudo apt-get update
sudo apt-get remove --purge mysql-client mysql-server mysql-common -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
sudo rm -rf /var/lib/mysql/

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: release
http-user-agent: release
use-public-rspm: true

- name: Install R and dependencies
run: |
sudo apt-get install --no-install-recommends software-properties-common dirmngr -y
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt-get update -qq
sudo apt-get upgrade -y
sudo apt-get install -qq libxml2-dev libcurl4-openssl-dev libssl-dev libgsl-dev libgit2-dev r-base -y
sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev xml-twig-tools -y
sudo R -q -e "install.packages(c('devtools','covr','fields','meta','metafor','ggplot2','gridExtra','data.table','DSI','DSOpal','DSLite','MolgenisAuth','MolgenisArmadillo','DSMolgenisArmadillo','DescTools','e1071'), repos='https://cloud.r-project.org')"
sudo R -q -e "devtools::install_github(repo='datashield/dsDangerClient', ref=Sys.getenv('BRANCH_NAME'))"

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: 'c("Imports")'
extra-packages: |
any::rcmdcheck
cran::devtools
cran::git2r
cran::RCurl
cran::readr
cran::magrittr
cran::xml2
cran::purrr
cran::dplyr
cran::stringr
cran::tidyr
cran::quarto
cran::knitr
cran::kableExtra
cran::rmarkdown
cran::downlit
needs: check

- name: Check manual updated
run: |
orig_sum=$(find man -type f | sort -u | xargs cat | md5sum)
R -q -e "devtools::document()"
new_sum=$(find man -type f | sort -u | xargs cat | md5sum)
if [ "$orig_sum" != "$new_sum" ]; then
echo "Your committed man/*.Rd files are out of sync with the R headers."
exit 1
fi
working-directory: dsBaseClient
continue-on-error: true

- name: Devtools checks
run: |
R -q -e "devtools::check(args = c('--no-examples', '--no-tests'))" | tee azure-pipelines_check.Rout
grep --quiet "^0 errors" azure-pipelines_check.Rout && grep --quiet " 0 warnings" azure-pipelines_check.Rout && grep --quiet " 0 notes" azure-pipelines_check.Rout
working-directory: dsBaseClient
continue-on-error: true

- name: Start Armadillo docker-compose
run: docker compose -f docker-compose_armadillo.yml up -d --build
working-directory: dsBaseClient

- name: Install test datasets
run: |
sleep 60
R -q -f "molgenis_armadillo-upload_testing_datasets.R"
working-directory: dsBaseClient/tests/testthat/data_files

- name: Install dsBase to Armadillo
run: |
curl -u admin:admin -X GET http://localhost:8080/packages
curl -u admin:admin -H 'Content-Type: multipart/form-data' -F "file=@dsBase_6.3.5-permissive.tar.gz" -X POST http://localhost:8080/install-package
sleep 60
docker restart dsbaseclient-armadillo-1
sleep 30
curl -u admin:admin -X POST http://localhost:8080/whitelist/dsBase
working-directory: dsBaseClient

- name: Run tests with coverage & JUnit report
run: |
mkdir -p logs
R -q -e "devtools::reload();"
R -q -e '
write.csv(
covr::coverage_to_list(
covr::package_coverage(
type = c("none"),
code = c('"'"'
output_file <- file("test_console_output.txt");
sink(output_file);
sink(output_file, type = "message");
junit_rep <- testthat::JunitReporter$new(file = file.path(getwd(), "test_results.xml"));
progress_rep <- testthat::ProgressReporter$new(max_failures = 999999);
multi_rep <- testthat::MultiReporter$new(reporters = list(progress_rep, junit_rep));
options("datashield.return_errors" = FALSE, "default_driver" = "ArmadilloDriver");
testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ env.TEST_FILTER }}", reporter = multi_rep, stop_on_failure = FALSE)'"'"'
)
)
),
"coveragelist.csv"
)'

mv coveragelist.csv logs/
mv test_* logs/
working-directory: dsBaseClient

- name: Check for JUnit errors
run: |
issue_count=$(sed 's/failures="0" errors="0"//' test_results.xml | grep -c errors= || true)
echo "Number of testsuites with issues: $issue_count"
sed 's/failures="0" errors="0"//' test_results.xml | grep errors= > issues.log || true
cat issues.log || true
# continue with workflow even when some tests fail
exit 0
working-directory: dsBaseClient/logs

- name: Write versions to file
run: |
echo "branch:${{ env.BRANCH_NAME }}" > ${{ env.WORKFLOW_ID }}.txt
echo "os:$(lsb_release -ds)" >> ${{ env.WORKFLOW_ID }}.txt
echo "R:$(R --version | head -n1)" >> ${{ env.WORKFLOW_ID }}.txt
Rscript --vanilla -e 'sessionInfo()' >> session_info_${{ env.WORKFLOW_ID }}.txt
working-directory: dsBaseClient/logs

- name: Parse results from testthat and covr
run: |
Rscript --verbose --vanilla ../testStatus/source/parse_test_report.R logs/ logs/ https://github.com/datashield/${{ env.PROJECT_NAME }}/blob/${{ env.BRANCH_NAME }} '([^:]+)' '(?<=::)[^:]+(?=::)'
working-directory: dsBaseClient
env:
PROJECT_NAME: ${{ env.PROJECT_NAME }}
BRANCH_NAME: ${{ env.BRANCH_NAME }}

- name: Render report
run: |
cd testStatus

mkdir -p new/logs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/
mkdir -p new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/
mkdir -p new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/latest/

# Copy logs to new logs directory location
cp -rv ../dsBaseClient/logs/* new/logs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/
cp -rv ../dsBaseClient/logs/${{ env.WORKFLOW_ID }}.txt new/logs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/

R -e 'input_dir <- file.path("../new/logs", Sys.getenv("PROJECT_NAME"), Sys.getenv("BRANCH_NAME"), Sys.getenv("WORKFLOW_ID")); quarto::quarto_render("source/test_report.qmd", execute_params = list(input_dir = input_dir))'
mv source/test_report.html new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/index.html
cp -r new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/* new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/latest

env:
PROJECT_NAME: ${{ env.PROJECT_NAME }}
BRANCH_NAME: ${{ env.BRANCH_NAME }}
WORKFLOW_ID: ${{ env.WORKFLOW_ID }}

- name: Upload test logs
uses: actions/upload-artifact@v4
with:
name: dsbaseclient-logs
path: testStatus/new

- name: Dump environment info
run: |
echo -e "\n#############################"
echo -e "ls /: ######################"
ls -al .
echo -e "\n#############################"
echo -e "lscpu: ######################"
lscpu
echo -e "\n#############################"
echo -e "memory: #####################"
free -m
echo -e "\n#############################"
echo -e "env: ########################"
env
echo -e "\n#############################"
echo -e "R sessionInfo(): ############"
R -e 'sessionInfo()'
sudo apt install tree -y
tree .
8 changes: 2 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: dsBaseClient
Title: 'DataSHIELD' Client Side Base Functions
Version: 6.3.4
Version: 6.3.5
Description: Base 'DataSHIELD' functions for the client side. 'DataSHIELD' is a software package which allows
you to do non-disclosive federated analysis on sensitive data. 'DataSHIELD' analytic functions have
been designed to only share non disclosive summary statistics, with built in automated output
checking based on statistical disclosure control. With data sites setting the threshold values for
the automated output checks. For more details, see 'citation("dsBaseClient")'.
the automated output checks. For more details, see citation('dsBaseClient').
Authors@R: c(person(given = "Paul",
family = "Burton",
role = c("aut"),
Expand Down Expand Up @@ -36,10 +36,6 @@ Authors@R: c(person(given = "Paul",
family = "Avraam",
role = c("aut"),
comment = c(ORCID = "0000-0001-8908-2441")),
person(given = "Demetris",
family = "Avraam",
role = c("aut"),
comment = c(ORCID = "0000-0001-8908-2441")),
person(given = "Yannick",
family = "Marcon",
role = c("aut"),
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(computeWeightedMeans)
export(ds.Boole)
export(ds.abs)
export(ds.asCharacter)
Expand Down Expand Up @@ -73,6 +72,7 @@ export(ds.matrixDimnames)
export(ds.matrixInvert)
export(ds.matrixMult)
export(ds.matrixTranspose)
export(ds.mdPattern)
export(ds.mean)
export(ds.meanByClass)
export(ds.meanSdGp)
Expand Down Expand Up @@ -118,6 +118,7 @@ export(ds.unList)
export(ds.unique)
export(ds.var)
export(ds.vectorCalc)
export(subsetHelper)
import(DSI)
import(data.table)
importFrom(stats,as.formula)
Expand Down
4 changes: 3 additions & 1 deletion R/computeWeightedMeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
#' @param variables character name of the variable(s) to focus on. The variables must be in the data.table
#' @param weight character name of the data.table column that contains a weight.
#' @param by character vector of the columns to group by
#' @return Returns a data table object with computed weighted means.
#'
#' @import data.table
#' @importFrom stats as.formula na.omit ts weighted.mean
#' @export
#' @keywords internal
computeWeightedMeans <- function(data_table, variables, weight, by) {

if (is.null(weight)) {
Expand Down
2 changes: 1 addition & 1 deletion R/ds.asFactor.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#' \code{baseline.level = 1} and \code{forced.factor.levels = c(1,2,3,4,5)}.
#' The input vector is converted to the following matrix of dummy variables:
#'
#' \tabular{rrrrr}{
#' \tabular{rrrr}{
#' \strong{DV2} \tab \strong{DV3} \tab \strong{DV4} \tab \strong{DV5} \cr
#' 0 \tab 0 \tab 0 \tab 0\cr
#' 1 \tab 0 \tab 0 \tab 0\cr
Expand Down
20 changes: 10 additions & 10 deletions R/ds.boxPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' ## Version 6, for version 5 see the Wiki
#'
#' ### Please ensure you have a training Virtual Machine running,
#' or that you have a live connection to a server.
#' # or that you have a live connection to a server.
#'
#' # Connecting to the Opal servers
#'
Expand All @@ -48,37 +48,37 @@
#' symbol = "D")
#'
#' ## Create a boxplot of one variable
#' ds.boxPlot("D", "LAB_HDL", datasources = connections)
#' ds.boxPlot("D", "LAB_HDL", datasources = connections)
#'
#' ## Create a boxplot that is split by study:
#' ds.boxPlot("D", "LAB_HDL", type= "split", datasources = connections)
#' ds.boxPlot("D", "LAB_HDL", type= "split", datasources = connections)
#'
#' ## Create a boxplot of two variables variable
#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG", type="pooled",
#' datasources = connections)
#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), type="pooled",
#' datasources = connections)
#' # only one plot is created (of the aggregated results of all servers)
#'
#' ## Create a boxplot of two variables, which are split by a factor
#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER",
#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER",
#' datasources = connections)
#'
#' ## Create a boxplot with x- and y-axis labels
#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER",
#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER",
#' xlabel = "Variable", ylabel = "Measurement", datasources = connections)
#'
#' ## Improve the presentation of ds.boxplot output using ggplot:
#' ### User must save the output, which is in a ggplot format already:
#' a <- ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER",
#' a <- ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER",
#' xlabel = "Variable", ylabel = "Measurement", datasources = connections)
#'
#' ### Then customise output "a" using ggplot tools:
#' a + ggplot2::scale_fill_discrete(name = "Gender", labels = c("Male", "Female"))
#'
#' ### Or use an alternative way, to maintain the aesthetics:
#' a + ggplot2::scale_fill_brewer(name = "Gender", labels = c("Male", "Female"))
#' a + ggplot2::scale_fill_brewer(name = "Gender", labels = c("Male", "Female"))
#'
#' # Clear the Datashield R sessions and logout
#' datashield.logout(connections)
#' datashield.logout(connections)
#'
#' }
#'
Expand Down
Loading
Loading