Skip to content

Commit 35d91ff

Browse files
Merge branch 'datashield:v7.0-dev-feat/performance' into v7.0-dev-feat/performance
2 parents 5311eb0 + 10cc3af commit 35d91ff

161 files changed

Lines changed: 378 additions & 1417 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.

DESCRIPTION

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dsBaseClient
22
Title: 'DataSHIELD' Client Side Base Functions
3-
Version: 7.0.0-9000
3+
Version: 6.3.5
44
Description: Base 'DataSHIELD' functions for the client side. 'DataSHIELD' is a software package which allows
55
you to do non-disclosive federated analysis on sensitive data. 'DataSHIELD' analytic functions have
66
been designed to only share non disclosive summary statistics, with built in automated output
@@ -36,10 +36,6 @@ Authors@R: c(person(given = "Paul",
3636
family = "Avraam",
3737
role = c("aut"),
3838
comment = c(ORCID = "0000-0001-8908-2441")),
39-
person(given = "Demetris",
40-
family = "Avraam",
41-
role = c("aut"),
42-
comment = c(ORCID = "0000-0001-8908-2441")),
4339
person(given = "Yannick",
4440
family = "Marcon",
4541
role = c("aut"),

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export(ds.rBinom)
8989
export(ds.rNorm)
9090
export(ds.rPois)
9191
export(ds.rUnif)
92-
export(ds.ranksSecure)
9392
export(ds.rbind)
9493
export(ds.reShape)
9594
export(ds.recodeLevels)

R/ds.asFactor.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#' \code{baseline.level = 1} and \code{forced.factor.levels = c(1,2,3,4,5)}.
4949
#' The input vector is converted to the following matrix of dummy variables:
5050
#'
51-
#' \tabular{rrrrr}{
51+
#' \tabular{rrrr}{
5252
#' \strong{DV2} \tab \strong{DV3} \tab \strong{DV4} \tab \strong{DV5} \cr
5353
#' 0 \tab 0 \tab 0 \tab 0\cr
5454
#' 1 \tab 0 \tab 0 \tab 0\cr

R/ds.colnames.R

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
#'
22
#' @title Produces column names of the R object in the server-side
3-
#' @description Retrieves column names of an R object on the server-side.
3+
#' @description Retrieves column names of an R object on the server-side.
44
#' This function is similar to R function \code{colnames}.
5-
#' @details The input is restricted to the object of type \code{data.frame} or \code{matrix}.
6-
#'
5+
#' @details The input is restricted to the object of type \code{data.frame} or \code{matrix}.
6+
#'
77
#' Server function called: \code{colnamesDS}
88
#' @param x a character string providing the name of the input data frame or matrix.
9-
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
9+
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
1010
#' If the \code{datasources} argument is not specified
11-
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
12-
#' @return \code{ds.colnames} returns the column names of
13-
#' the specified server-side data frame or matrix.
11+
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
12+
#' @return \code{ds.colnames} returns the column names of
13+
#' the specified server-side data frame or matrix.
1414
#' @author DataSHIELD Development Team
1515
#' @seealso \code{\link{ds.dim}} to obtain the dimensions of a matrix or a data frame.
16-
#' @examples
16+
#' @examples
1717
#' \dontrun{
18-
#'
18+
#'
1919
#' ## Version 6, for version 5 see the Wiki
2020
#' # Connecting to the Opal servers
21-
#'
21+
#'
2222
#' require('DSI')
2323
#' require('DSOpal')
2424
#' require('dsBaseClient')
25-
#'
25+
#'
2626
#' builder <- DSI::newDSLoginBuilder()
27-
#' builder$append(server = "study1",
28-
#' url = "http://192.168.56.100:8080/",
29-
#' user = "administrator", password = "datashield_test&",
27+
#' builder$append(server = "study1",
28+
#' url = "http://192.168.56.100:8080/",
29+
#' user = "administrator", password = "datashield_test&",
3030
#' table = "CNSIM.CNSIM1", driver = "OpalDriver")
31-
#' builder$append(server = "study2",
32-
#' url = "http://192.168.56.100:8080/",
33-
#' user = "administrator", password = "datashield_test&",
31+
#' builder$append(server = "study2",
32+
#' url = "http://192.168.56.100:8080/",
33+
#' user = "administrator", password = "datashield_test&",
3434
#' table = "CNSIM.CNSIM2", driver = "OpalDriver")
3535
#' builder$append(server = "study3",
36-
#' url = "http://192.168.56.100:8080/",
37-
#' user = "administrator", password = "datashield_test&",
36+
#' url = "http://192.168.56.100:8080/",
37+
#' user = "administrator", password = "datashield_test&",
3838
#' table = "CNSIM.CNSIM3", driver = "OpalDriver")
3939
#' logindata <- builder$build()
40-
#'
40+
#'
4141
#' # Log onto the remote Opal training servers
42-
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
43-
#'
42+
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
43+
#'
4444
#' # Getting column names of the R objects stored in the server-side
4545
#' ds.colnames(x = "D",
4646
#' datasources = connections[1]) #only the first server ("study1") is used
4747
#' # Clear the Datashield R sessions and logout
48-
#' datashield.logout(connections)
48+
#' datashield.logout(connections)
4949
#' }
5050
#' @export
5151
#'
@@ -65,6 +65,17 @@ ds.colnames <- function(x=NULL, datasources=NULL) {
6565
stop("Please provide the name of a data.frame or matrix!", call.=FALSE)
6666
}
6767

68+
# check if the input object(s) is(are) defined in all the studies
69+
defined <- isDefined(datasources, x)
70+
71+
# call the internal function that checks the input object is of the same class in all studies.
72+
typ <- checkClass(datasources, x)
73+
74+
# if the input object is not a matrix or a dataframe stop
75+
if(!('data.frame' %in% typ) & !('matrix' %in% typ)){
76+
stop("The input vector must be of type 'data.frame' or a 'matrix'!", call.=FALSE)
77+
}
78+
6879
cally <- call("colnamesDS", x)
6980
column_names <- DSI::datashield.aggregate(datasources, cally)
7081

0 commit comments

Comments
 (0)