Skip to content

Commit 97c6cda

Browse files
Merge pull request #364 from datashield/v6.3.1-dev
6.3.1 release
2 parents e206b3c + 6690502 commit 97c6cda

225 files changed

Lines changed: 3883 additions & 3856 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
^data$
88
^docs$
99
^pkgdown$
10+
^\.circleci$
11+
^\.circleci/config\.yml$

.circleci/config.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright (c) 2024 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
3+
version: 2.1
4+
5+
jobs:
6+
dsbase:
7+
docker:
8+
- image: cimg/base:current
9+
resource_class: small
10+
steps:
11+
- checkout
12+
- setup_remote_docker:
13+
docker_layout_caching: true
14+
- run: |
15+
echo "Building"
16+
echo " Repo Name: " $CIRCLE_PROJECT_REPONAME
17+
echo " Branch: " $CIRCLE_BRANCH
18+
echo " Tag: " $CIRCLE_TAG
19+
- run:
20+
command: |
21+
sudo apt-get update -y
22+
sudo apt-get install -y r-base-core cmake
23+
- run:
24+
command: |
25+
sudo apt-get install -y libxml2-dev
26+
- run:
27+
command: |
28+
sudo Rscript -e "install.packages('RANN', dependencies=TRUE)"
29+
sudo Rscript -e "install.packages('stringr', dependencies=TRUE)"
30+
sudo Rscript -e "install.packages('lme4', dependencies=TRUE)"
31+
sudo Rscript -e "install.packages('dplyr', dependencies=TRUE)"
32+
sudo Rscript -e "install.packages('reshape2', dependencies=TRUE)"
33+
sudo Rscript -e "install.packages('polycor', dependencies=TRUE)"
34+
sudo Rscript -e "install.packages('splines', dependencies=TRUE)"
35+
sudo Rscript -e "install.packages('gamlss', dependencies=TRUE)"
36+
sudo Rscript -e "install.packages('gamlss.dist', dependencies=TRUE)"
37+
sudo Rscript -e "install.packages('mice', dependencies=TRUE)"
38+
sudo Rscript -e "install.packages('childsds', dependencies=TRUE)"
39+
sudo Rscript -e "install.packages('xml2', dependencies=TRUE)"
40+
sudo Rscript -e "install.packages('covr', dependencies=TRUE)"
41+
sudo Rscript -e "install.packages('devtools', dependencies=TRUE)"
42+
sudo Rscript -e "install.packages('DSI', dependencies=TRUE)"
43+
sudo Rscript -e "install.packages('DSLite', dependencies=TRUE)"
44+
- run:
45+
command: |
46+
sudo Rscript -e 'library(covr); covr::codecov(token = "'$CODECOV_TOKEN'")'
47+
workflows:
48+
build:
49+
jobs:
50+
- dsbase

DESCRIPTION

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Package: dsBase
2-
Title: DataSHIELD server site base functions
3-
Description: DataSHIELD server site base functions.
4-
Version: 6.3.0
2+
Title: DataSHIELD Server Site Base Functions
3+
Description: DataSHIELD Server Site Base Functions.
4+
Version: 6.3.1
55
Author: DataSHIELD Developers <datashield@liverpool.ac.uk>
66
Maintainer: DataSHIELD Developers <datashield@liverpool.ac.uk>
77
License: GPL-3
88
Depends:
9-
R (>= 3.5.0)
9+
R (>= 4.0.0)
1010
Imports:
1111
RANN,
1212
stringr,
@@ -19,6 +19,8 @@ Imports:
1919
gamlss.dist,
2020
mice,
2121
childsds
22+
Suggests:
23+
testthat
2224
AggregateMethods:
2325
asFactorDS1,
2426
asListDS,
@@ -194,5 +196,5 @@ Options:
194196
default.nfilter.noise=0.25,
195197
default.nfilter.levels.density=0.33,
196198
default.nfilter.levels.max=40
197-
RoxygenNote: 7.2.3
199+
RoxygenNote: 7.3.2
198200
Encoding: UTF-8

R/asListDS.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
#' @description Coerces an R object into a list
33
#' @details Unlike most other class coercing functions this is
44
#' an aggregate function rather than an assign function. This
5-
#' is because the {datashield.assign} function in the data repository deals specially with
5+
#' is because the \code{datashield.assign} function in the data repository deals specially with
66
#' a created object (newobj) if it is of class list. Reconfiguring the
77
#' function as an aggregate function works around this problem.
8-
#' This aggregate function is based on the native R function {as.list}
9-
#' and so additional information can be found in the help for {as.list}
8+
#' This aggregate function is based on the native R function \code{as.list}
9+
#' and so additional information can be found in the help for \code{as.list}
1010
#' @param x.name the name of the input object to be coerced to class
1111
#' data.matrix. Must be specified in inverted commas. But this argument is
1212
#' usually specified directly by <x.name> argument of the clientside function
13-
#' {ds.asList}
13+
#' \code{ds.asList}
1414
#' @param newobj is the object hard assigned '<<-' to be the output of the
1515
#' function written to the serverside
1616
#' @return the object specified by the <newobj> argument (or its default name
1717
#' <x.name>.mat) which is written to the serverside.
1818
#' In addition, two validity messages are returned. The first confirms an output
19-
#' object has been created, the second states its class. The way that {as.list}
19+
#' object has been created, the second states its class. The way that \code{as.list}
2020
#' coerces objects to list depends on the class of the object, but in general
2121
#' the class of the output object should usually be 'list'
2222
#' @author Amadou Gaye, Paul Burton for DataSHIELD Development Team

R/asLogicalDS.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#' @title Coerces an R object into class numeric
2-
#' @description this function is based on the native R function {as.numeric}
3-
#' @details See help for function {as.logical} in native R
2+
#' @description this function is based on the native R function \code{as.numeric}
3+
#' @details See help for function \code{as.logical} in native R
44
#' @param x.name the name of the input object to be coerced to class
55
#' numeric. Must be specified in inverted commas. But this argument is
66
#' usually specified directly by <x.name> argument of the clientside function
7-
#' {ds.aslogical}
7+
#' \code{ds.aslogical}
88
#' @return the object specified by the <newobj> argument (or its default name
99
#' <x.name>.logic) which is written to the serverside. For further
10-
#' details see help on the clientside function {ds.asLogical}
10+
#' details see help on the clientside function \code{ds.asLogical}
1111
#' @author Amadou Gaye, Paul Burton for DataSHIELD Development Team
1212
#' @export
1313
asLogicalDS <- function (x.name){

R/asMatrixDS.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#' @title Coerces an R object into a matrix
2-
#' @description this function is based on the native R function {as.matrix}
3-
#' @details See help for function {as.matrix} in native R
2+
#' @description this function is based on the native R function \code{as.matrix}
3+
#' @details See help for function \code{as.matrix} in native R
44
#' @param x.name the name of the input object to be coerced to class
55
#' matrix. Must be specified in inverted commas. But this argument is
66
#' usually specified directly by <x.name> argument of the clientside function
7-
#' {ds.asMatrix}
7+
#' \code{ds.asMatrix}
88
#' @return the object specified by the <newobj> argument (or its default name
99
#' <x.name>.mat) which is written to the serverside. For further
10-
#' details see help on the clientside function {ds.asMatrix}
10+
#' details see help on the clientside function \code{ds.asMatrix}
1111
#' @author Amadou Gaye, Paul Burton for DataSHIELD Development Team
1212
#' @export
1313
asMatrixDS <- function (x.name){

R/cDS.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cDS <- function (objs) {
2828

2929
# check if the output is valid and output accordingly
3030
if(length(x) < nfilter.tab){
31-
if(length(x == 0)){
31+
if(length(x) == 0){
3232
x <- c()
3333
}else{
3434
x <- rep(NA, length(x))

R/completeCasesDS.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#' @title completeCasesDS: an assign function called by ds.completeCases
22
#' @description Identifies and strips out all rows of a data.frame,
33
#' matrix or vector that contain NAs.
4-
#' @details In the case of a data.frame or matrix, {completeCasesDS} identifies
4+
#' @details In the case of a data.frame or matrix, \code{completeCasesDS} identifies
55
#' all rows containing one or more NAs and deletes those
66
#' rows altogether. Any one variable with NA in a given row will lead
7-
#' to deletion of the whole row. In the case of a vector, {completeCasesDS}
7+
#' to deletion of the whole row. In the case of a vector, \code{completeCasesDS}
88
#' acts in an equivalent manner but there is no equivalent to a 'row'
99
#' and so it simply strips out all observations recorded as NA.
10-
#' {ds.completeCASES} is analogous to the {complete.cases} function
10+
#' \code{ds.completeCASES} is analogous to the \code{complete.cases} function
1111
#' in native R. Limited additional information can therefore be found
1212
#' under help("complete.cases") in native R.
1313
#' @param x1.transmit This argument determines the input data.frame,
1414
#' matrix or vector from which rows with NAs are to be stripped.
1515
#' The <x1.transmit> argument is fully specified by the <x1> argument
16-
#' of the {ds.completeCases} function.
16+
#' of the \code{ds.completeCases} function.
1717
#' @return a modified data.frame, matrix or vector from which
1818
#' all rows containing at least one NA have been deleted. This
1919
#' modified object is written to the serverside in each source.
@@ -24,7 +24,7 @@
2424
#' ds.completeCases also returns any studysideMessages that can help
2525
#' explain the error in creating
2626
#' the full output object. As well as appearing on the screen at run time,if you wish to
27-
#' see the relevant studysideMessages at a later date you can use the {ds.message}
27+
#' see the relevant studysideMessages at a later date you can use the \code{ds.message}
2828
#' function. If you type ds.message("newobj") it will print out the relevant
2929
#' studysideMessage from any datasource in which there was an error in creating <newobj>
3030
#' and a studysideMessage was saved. If there was no error and <newobj> was created

R/dataFrameSubsetDS2.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#' dataFrameSubsetDS2 (via ds.dataFrame()) also returns any studysideMessages
4848
#' that can explain the error in creating
4949
#' the full output object. As well as appearing on the screen at run time,if you wish to
50-
#' see the relevant studysideMessages at a later date you can use the {ds.message}
50+
#' see the relevant studysideMessages at a later date you can use the \code{ds.message}
5151
#' function. If you type ds.message("newobj") it will print out the relevant
5252
#' studysideMessage from any datasource in which there was an error in creating <newobj>
5353
#' and a studysideMessage was saved. If there was no error and <newobj> was created

R/lexisDS2.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ lexisDS2 <- function(datatext=NULL, intervalWidth, maxmaxtime, idCol, entryCol,
129129

130130

131131
#intervalWidth IS A SINGLE VALUE
132-
if(is.null(intervalWidth)||is.na(intervalWidth)||intervalWidth==0){
132+
if(any(is.null(intervalWidth))||any(is.na(intervalWidth))||any(intervalWidth==0)){
133133
return("A VALID NON-ZERO intervalWidth ARGUMENT MUST BE SPECIFIED")
134134
}
135135

0 commit comments

Comments
 (0)