Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6d3794f
Fixes to code comments, and documentation updates
StuartWheater Nov 5, 2025
0af74a0
Disable default testing on CRAN
StuartWheater Nov 5, 2025
e55f341
try: set server to not print datashield errors
timcadman Nov 13, 2025
1352363
revert: remove changes to ds.colnames from this branch
timcadman Nov 13, 2025
5cb506b
remove dsRankSecure
timcadman Nov 13, 2025
b18800f
docs: updated docs with removed functions
timcadman Nov 13, 2025
10cc3af
make error message neutral between versions of DSI
timcadman Nov 13, 2025
35d91ff
Merge branch 'datashield:v7.0-dev-feat/performance' into v7.0-dev-fea…
StuartWheater Nov 16, 2025
01b7db9
Update to align 'v7.0-dev-feat/performance' with 'v7.0-dev'
StuartWheater Nov 16, 2025
4608bd7
Comment out 'ds.ranksSecure'
StuartWheater Nov 16, 2025
9d07ed3
Rework 'smk_expt-ds.ranksSecure'
StuartWheater Nov 16, 2025
2555477
Fix typos
StuartWheater Nov 16, 2025
5223c6c
Updated 'ds.colnames' manual
StuartWheater Nov 17, 2025
bcd763b
Reaction to changes to packages
StuartWheater Nov 17, 2025
1dace04
Updated perf profiles
StuartWheater Nov 17, 2025
5a246fb
Updated messages expected
StuartWheater Nov 17, 2025
4b7a1b2
Update pipelines
StuartWheater Nov 17, 2025
4f98392
Update 'tar's
StuartWheater Nov 17, 2025
202f441
Fixed escaping typo
StuartWheater Nov 17, 2025
533789d
Fixed typo in '.Rbuildignore'
StuartWheater Nov 17, 2025
9a97118
Collective changes updating 6.3.5-dev, 7.0-dev, and v7.0-dev-feat/per…
StuartWheater Nov 17, 2025
18f50cb
Merge branch 'v7.0-dev' of github.com:datashield/dsBaseClient into v7…
timcadman Nov 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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.5.tar.gz$
^dsBase_6.3.5-permissive.tar.gz$
^dsBase_7.0-dev-feat_performance\.tar\.gz$
^dsBase_7.0-dev-feat_performance-permissive\.tar\.gz$
^dsDanger_6.3.4.tar.gz$
^\.circleci$
^\.circleci/config\.yml$
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export(ds.rBinom)
export(ds.rNorm)
export(ds.rPois)
export(ds.rUnif)
export(ds.ranksSecure)
export(ds.rbind)
export(ds.reShape)
export(ds.recodeLevels)
Expand Down
55 changes: 33 additions & 22 deletions R/ds.colnames.R
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
#'
#' @title Produces column names of the R object in the server-side
#' @description Retrieves column names of an R object on the server-side.
#' @description Retrieves column names of an R object on the server-side.
#' This function is similar to R function \code{colnames}.
#' @details The input is restricted to the object of type \code{data.frame} or \code{matrix}.
#'
#' @details The input is restricted to the object of type \code{data.frame} or \code{matrix}.
#'
#' Server function called: \code{colnamesDS}
#' @param x a character string providing the name of the input data frame or matrix.
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
#' If the \code{datasources} argument is not specified
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
#' @return \code{ds.colnames} returns the column names of
#' the specified server-side data frame or matrix.
#' @return \code{ds.colnames} returns the column names of
#' the specified server-side data frame or matrix.
#' @author DataSHIELD Development Team
#' @seealso \code{\link{ds.dim}} to obtain the dimensions of a matrix or a data frame.
#' @examples
#' @examples
#' \dontrun{
#'
#'
#' ## Version 6, for version 5 see the Wiki
#' # Connecting to the Opal servers
#'
#'
#' require('DSI')
#' require('DSOpal')
#' require('dsBaseClient')
#'
#'
#' builder <- DSI::newDSLoginBuilder()
#' builder$append(server = "study1",
#' url = "http://192.168.56.100:8080/",
#' user = "administrator", password = "datashield_test&",
#' builder$append(server = "study1",
#' url = "http://192.168.56.100:8080/",
#' user = "administrator", password = "datashield_test&",
#' table = "CNSIM.CNSIM1", driver = "OpalDriver")
#' builder$append(server = "study2",
#' url = "http://192.168.56.100:8080/",
#' user = "administrator", password = "datashield_test&",
#' builder$append(server = "study2",
#' url = "http://192.168.56.100:8080/",
#' user = "administrator", password = "datashield_test&",
#' table = "CNSIM.CNSIM2", driver = "OpalDriver")
#' builder$append(server = "study3",
#' url = "http://192.168.56.100:8080/",
#' user = "administrator", password = "datashield_test&",
#' url = "http://192.168.56.100:8080/",
#' user = "administrator", password = "datashield_test&",
#' table = "CNSIM.CNSIM3", driver = "OpalDriver")
#' logindata <- builder$build()
#'
#'
#' # Log onto the remote Opal training servers
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
#'
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
#'
#' # Getting column names of the R objects stored in the server-side
#' ds.colnames(x = "D",
#' datasources = connections[1]) #only the first server ("study1") is used
#' # Clear the Datashield R sessions and logout
#' datashield.logout(connections)
#' datashield.logout(connections)
#' }
#' @export
#'
Expand All @@ -65,6 +65,17 @@ ds.colnames <- function(x=NULL, datasources=NULL) {
stop("Please provide the name of a data.frame or matrix!", call.=FALSE)
}

# check if the input object(s) is(are) defined in all the studies
defined <- isDefined(datasources, x)

# call the internal function that checks the input object is of the same class in all studies.
typ <- checkClass(datasources, x)

# if the input object is not a matrix or a dataframe stop
if(!('data.frame' %in% typ) & !('matrix' %in% typ)){
stop("The input vector must be of type 'data.frame' or a 'matrix'!", call.=FALSE)
}

cally <- call("colnamesDS", x)
column_names <- DSI::datashield.aggregate(datasources, cally)

Expand Down
Loading
Loading