Skip to content

Commit

Permalink
Merge pull request #364 from datashield/v6.3.1-dev
Browse files Browse the repository at this point in the history
6.3.1 release
  • Loading branch information
StuartWheater authored Nov 12, 2024
2 parents e206b3c + 6690502 commit 97c6cda
Show file tree
Hide file tree
Showing 225 changed files with 3,883 additions and 3,856 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^data$
^docs$
^pkgdown$
^\.circleci$
^\.circleci/config\.yml$
50 changes: 50 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright (c) 2024 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.

version: 2.1

jobs:
dsbase:
docker:
- image: cimg/base:current
resource_class: small
steps:
- checkout
- setup_remote_docker:
docker_layout_caching: true
- run: |
echo "Building"
echo " Repo Name: " $CIRCLE_PROJECT_REPONAME
echo " Branch: " $CIRCLE_BRANCH
echo " Tag: " $CIRCLE_TAG
- run:
command: |
sudo apt-get update -y
sudo apt-get install -y r-base-core cmake
- run:
command: |
sudo apt-get install -y libxml2-dev
- run:
command: |
sudo Rscript -e "install.packages('RANN', dependencies=TRUE)"
sudo Rscript -e "install.packages('stringr', dependencies=TRUE)"
sudo Rscript -e "install.packages('lme4', dependencies=TRUE)"
sudo Rscript -e "install.packages('dplyr', dependencies=TRUE)"
sudo Rscript -e "install.packages('reshape2', dependencies=TRUE)"
sudo Rscript -e "install.packages('polycor', dependencies=TRUE)"
sudo Rscript -e "install.packages('splines', dependencies=TRUE)"
sudo Rscript -e "install.packages('gamlss', dependencies=TRUE)"
sudo Rscript -e "install.packages('gamlss.dist', dependencies=TRUE)"
sudo Rscript -e "install.packages('mice', dependencies=TRUE)"
sudo Rscript -e "install.packages('childsds', dependencies=TRUE)"
sudo Rscript -e "install.packages('xml2', dependencies=TRUE)"
sudo Rscript -e "install.packages('covr', dependencies=TRUE)"
sudo Rscript -e "install.packages('devtools', dependencies=TRUE)"
sudo Rscript -e "install.packages('DSI', dependencies=TRUE)"
sudo Rscript -e "install.packages('DSLite', dependencies=TRUE)"
- run:
command: |
sudo Rscript -e 'library(covr); covr::codecov(token = "'$CODECOV_TOKEN'")'
workflows:
build:
jobs:
- dsbase
12 changes: 7 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: dsBase
Title: DataSHIELD server site base functions
Description: DataSHIELD server site base functions.
Version: 6.3.0
Title: DataSHIELD Server Site Base Functions
Description: DataSHIELD Server Site Base Functions.
Version: 6.3.1
Author: DataSHIELD Developers <[email protected]>
Maintainer: DataSHIELD Developers <[email protected]>
License: GPL-3
Depends:
R (>= 3.5.0)
R (>= 4.0.0)
Imports:
RANN,
stringr,
Expand All @@ -19,6 +19,8 @@ Imports:
gamlss.dist,
mice,
childsds
Suggests:
testthat
AggregateMethods:
asFactorDS1,
asListDS,
Expand Down Expand Up @@ -194,5 +196,5 @@ Options:
default.nfilter.noise=0.25,
default.nfilter.levels.density=0.33,
default.nfilter.levels.max=40
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Encoding: UTF-8
10 changes: 5 additions & 5 deletions R/asListDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#' @description Coerces an R object into a list
#' @details Unlike most other class coercing functions this is
#' an aggregate function rather than an assign function. This
#' is because the {datashield.assign} function in the data repository deals specially with
#' is because the \code{datashield.assign} function in the data repository deals specially with
#' a created object (newobj) if it is of class list. Reconfiguring the
#' function as an aggregate function works around this problem.
#' This aggregate function is based on the native R function {as.list}
#' and so additional information can be found in the help for {as.list}
#' This aggregate function is based on the native R function \code{as.list}
#' and so additional information can be found in the help for \code{as.list}
#' @param x.name the name of the input object to be coerced to class
#' data.matrix. Must be specified in inverted commas. But this argument is
#' usually specified directly by <x.name> argument of the clientside function
#' {ds.asList}
#' \code{ds.asList}
#' @param newobj is the object hard assigned '<<-' to be the output of the
#' function written to the serverside
#' @return the object specified by the <newobj> argument (or its default name
#' <x.name>.mat) which is written to the serverside.
#' In addition, two validity messages are returned. The first confirms an output
#' object has been created, the second states its class. The way that {as.list}
#' object has been created, the second states its class. The way that \code{as.list}
#' coerces objects to list depends on the class of the object, but in general
#' the class of the output object should usually be 'list'
#' @author Amadou Gaye, Paul Burton for DataSHIELD Development Team
Expand Down
8 changes: 4 additions & 4 deletions R/asLogicalDS.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#' @title Coerces an R object into class numeric
#' @description this function is based on the native R function {as.numeric}
#' @details See help for function {as.logical} in native R
#' @description this function is based on the native R function \code{as.numeric}
#' @details See help for function \code{as.logical} in native R
#' @param x.name the name of the input object to be coerced to class
#' numeric. Must be specified in inverted commas. But this argument is
#' usually specified directly by <x.name> argument of the clientside function
#' {ds.aslogical}
#' \code{ds.aslogical}
#' @return the object specified by the <newobj> argument (or its default name
#' <x.name>.logic) which is written to the serverside. For further
#' details see help on the clientside function {ds.asLogical}
#' details see help on the clientside function \code{ds.asLogical}
#' @author Amadou Gaye, Paul Burton for DataSHIELD Development Team
#' @export
asLogicalDS <- function (x.name){
Expand Down
8 changes: 4 additions & 4 deletions R/asMatrixDS.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#' @title Coerces an R object into a matrix
#' @description this function is based on the native R function {as.matrix}
#' @details See help for function {as.matrix} in native R
#' @description this function is based on the native R function \code{as.matrix}
#' @details See help for function \code{as.matrix} in native R
#' @param x.name the name of the input object to be coerced to class
#' matrix. Must be specified in inverted commas. But this argument is
#' usually specified directly by <x.name> argument of the clientside function
#' {ds.asMatrix}
#' \code{ds.asMatrix}
#' @return the object specified by the <newobj> argument (or its default name
#' <x.name>.mat) which is written to the serverside. For further
#' details see help on the clientside function {ds.asMatrix}
#' details see help on the clientside function \code{ds.asMatrix}
#' @author Amadou Gaye, Paul Burton for DataSHIELD Development Team
#' @export
asMatrixDS <- function (x.name){
Expand Down
2 changes: 1 addition & 1 deletion R/cDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cDS <- function (objs) {

# check if the output is valid and output accordingly
if(length(x) < nfilter.tab){
if(length(x == 0)){
if(length(x) == 0){
x <- c()
}else{
x <- rep(NA, length(x))
Expand Down
10 changes: 5 additions & 5 deletions R/completeCasesDS.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#' @title completeCasesDS: an assign function called by ds.completeCases
#' @description Identifies and strips out all rows of a data.frame,
#' matrix or vector that contain NAs.
#' @details In the case of a data.frame or matrix, {completeCasesDS} identifies
#' @details In the case of a data.frame or matrix, \code{completeCasesDS} identifies
#' all rows containing one or more NAs and deletes those
#' rows altogether. Any one variable with NA in a given row will lead
#' to deletion of the whole row. In the case of a vector, {completeCasesDS}
#' to deletion of the whole row. In the case of a vector, \code{completeCasesDS}
#' acts in an equivalent manner but there is no equivalent to a 'row'
#' and so it simply strips out all observations recorded as NA.
#' {ds.completeCASES} is analogous to the {complete.cases} function
#' \code{ds.completeCASES} is analogous to the \code{complete.cases} function
#' in native R. Limited additional information can therefore be found
#' under help("complete.cases") in native R.
#' @param x1.transmit This argument determines the input data.frame,
#' matrix or vector from which rows with NAs are to be stripped.
#' The <x1.transmit> argument is fully specified by the <x1> argument
#' of the {ds.completeCases} function.
#' of the \code{ds.completeCases} function.
#' @return a modified data.frame, matrix or vector from which
#' all rows containing at least one NA have been deleted. This
#' modified object is written to the serverside in each source.
Expand All @@ -24,7 +24,7 @@
#' ds.completeCases also returns any studysideMessages that can help
#' explain the error in creating
#' the full output object. As well as appearing on the screen at run time,if you wish to
#' see the relevant studysideMessages at a later date you can use the {ds.message}
#' see the relevant studysideMessages at a later date you can use the \code{ds.message}
#' function. If you type ds.message("newobj") it will print out the relevant
#' studysideMessage from any datasource in which there was an error in creating <newobj>
#' and a studysideMessage was saved. If there was no error and <newobj> was created
Expand Down
2 changes: 1 addition & 1 deletion R/dataFrameSubsetDS2.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#' dataFrameSubsetDS2 (via ds.dataFrame()) also returns any studysideMessages
#' that can explain the error in creating
#' the full output object. As well as appearing on the screen at run time,if you wish to
#' see the relevant studysideMessages at a later date you can use the {ds.message}
#' see the relevant studysideMessages at a later date you can use the \code{ds.message}
#' function. If you type ds.message("newobj") it will print out the relevant
#' studysideMessage from any datasource in which there was an error in creating <newobj>
#' and a studysideMessage was saved. If there was no error and <newobj> was created
Expand Down
2 changes: 1 addition & 1 deletion R/lexisDS2.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ lexisDS2 <- function(datatext=NULL, intervalWidth, maxmaxtime, idCol, entryCol,


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

Expand Down
8 changes: 4 additions & 4 deletions R/lsDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
#' @title lists all objects on a serverside environment
#' @description creates a list of the names of all of the objects in
#' a specified serverside environment
#' @details Serverside aggregate function {lsDS} called by clientside function
#' {ds.ls}. When running analyses one may want to know the objects already generated. This
#' @details Serverside aggregate function \code{lsDS} called by clientside function
#' \code{ds.ls}. When running analyses one may want to know the objects already generated. This
#' request is not disclosive as it only returns the names of the objects and not their contents.
#' By default, objects in the current 'active analytic environment' (".GlobalEnv")
#' will be displayed. This
#' is the environment that contains all of the objects that serverside DataSHIELD
#' is using for the main analysis or has written out to the serverside during the process
#' of managing or undertaking the analysis (variables, scalars, matrices, data.frames etc).
#' For further details see help for {ds.ls} function and for native R function {ls}
#' For further details see help for \code{ds.ls} function and for native R function \code{ls}
#' @param search.filter either NULL or a character string (potentially including '*'
#' wildcards) specifying required search criteria. This argument is
#' fully specified by its corresponding argument in the clientside function.
#' @param env.to.search integer (e.g. in a format such as '2' or '5L' format) specifying
#' the position in the search path of the environment to be explored. This argument is
#' fully specified by its corresponding argument in the clientside function.
#' @return a list containing: (1) the name/details of the serverside R environment
#' which {ds.ls} has searched; (2) a vector of character strings giving the names of
#' which \code{ds.ls} has searched; (2) a vector of character strings giving the names of
#' all objects meeting the naming criteria specified by the argument <search.filter> in this
#' specified R serverside environment; (3) the nature of the search filter string as it was
#' actually applied
Expand Down
2 changes: 1 addition & 1 deletion R/matrixDS.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @title matrixDS assign function called by ds.matrix
#' @description Creates a matrix A on the serverside
#' @details Similar to the {matrix()} function in native R. Creates a matrix
#' @details Similar to the \code{matrix()} function in native R. Creates a matrix
#' with dimensions specified by <nrows.scalar> and <ncols.scalar> arguments
#' and assigns the values of all its elements based on the <mdata> argument
#' @param mdata.transmit specifies the elements of the matrix to be created. Fully
Expand Down
2 changes: 1 addition & 1 deletion R/matrixDetDS1.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#' @description Calculates the determinant of a square matrix A and returns
#' the output to the clientside
#' @details Calculates the determinant of a square matrix (for additional
#' information see help for {det} function in native R). This operation is only
#' information see help for \code{det} function in native R). This operation is only
#' possible if the number of columns and rows of A are the same.
#' @param M1.name A character string specifying the name of the matrix for which
#' determinant to be calculated
Expand Down
2 changes: 1 addition & 1 deletion R/matrixDetDS2.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#' @description Calculates the determinant of a square matrix A and writes
#' the output to the serverside
#' @details Calculates the determinant of a square matrix (for additional
#' information see help for {det} function in native R). This operation is only
#' information see help for \code{det} function in native R). This operation is only
#' possible if the number of columns and rows of A are the same.
#' @param M1.name A character string specifying the name of the matrix for which
#' determinant to be calculated
Expand Down
16 changes: 8 additions & 8 deletions R/matrixDiagDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
#' @description Extracts the diagonal vector from a square matrix A or
#' creates a diagonal matrix A based on a vector or a scalar value and
#' writes the output to the serverside
#' @details For details see help for function {ds.matrixDiag}.
#' @details For details see help for function \code{ds.matrixDiag}.
#' @param x1.transmit identifies the input matrix or vector. Fully
#' specified by <x1> argument of {ds.matrixDiag}. For more details
#' see help for {ds.matrixDiag}.
#' specified by <x1> argument of \code{ds.matrixDiag}. For more details
#' see help for \code{ds.matrixDiag}.
#' @param aim a character string specifying what behaviour is required
#' of the function. Fully specified by <aim> argument of {ds.matrixDiag}.
#' For more details see help for {ds.matrixDiag}.
#' of the function. Fully specified by <aim> argument of \code{ds.matrixDiag}.
#' For more details see help for \code{ds.matrixDiag}.
#' @param nrows.transmit a scalar value forcing the number of rows and
#' columns in an output matrix.Fully specified by <nrows.scalar>
#' argument of {ds.matrixDiag}.
#' For more details see help for {ds.matrixDiag}.
#' argument of \code{ds.matrixDiag}.
#' For more details see help for \code{ds.matrixDiag}.
#' @return Output is the matrix or vector specified by the <newobj> argument
#' (or default name diag_<x1>) which is written to the serverside.
#' For more details see help for {ds.matrixDiag}.
#' For more details see help for \code{ds.matrixDiag}.
#' @author Paul Burton for DataSHIELD Development Team
#' @export
matrixDiagDS <- function(x1.transmit,aim,nrows.transmit){
Expand Down
12 changes: 6 additions & 6 deletions R/matrixDimnamesDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
#' @description Adds dimnames (row names, column names or both) to
#' a matrix on the serverside.
#' @details Adds dimnames (row names, column names or both) to
#' a matrix on the serverside. Similar to the {dimnames} function
#' a matrix on the serverside. Similar to the \code{dimnames} function
#' in native R. For more details see help for
#' function {ds.matrixDimnames}
#' function \code{ds.matrixDimnames}
#' @param M1.name Specifies the name of the serverside matrix to which
#' dimnames are to be added. Fully specified by <M1> argument of
#' function {ds.matrixDimnames}. For more details
#' see help for {ds.matrixDimnames}.
#' function \code{ds.matrixDimnames}. For more details
#' see help for \code{ds.matrixDimnames}.
#' @param dimnames A dimnames attribute for the matrix: NULL or a list of
#' length 2 giving the row and column names respectively.
#' Fully specified by <dimnames> argument of
#' function {ds.matrixDimnames}. For more details
#' see help for {ds.matrixDimnames}.
#' function \code{ds.matrixDimnames}. For more details
#' see help for \code{ds.matrixDimnames}.
#' @return Output is the serverside matrix specified by the <newobj> argument
#' (or default name diag_<x1>) with specified dimnames (row and column
#' names) which is written to the serverside.
Expand Down
Loading

0 comments on commit 97c6cda

Please sign in to comment.