From 0121fe12c8663e95ec32d630f94a3719abaf5a94 Mon Sep 17 00:00:00 2001 From: Yannick Marcon Date: Mon, 18 May 2020 13:16:34 +0200 Subject: [PATCH] Documentation updated --- R/datashield.aggregate.R | 6 ++++++ R/datashield.assign.R | 10 +++++----- man/datashield.aggregate.Rd | 7 +++++++ man/datashield.assign.expr.Rd | 4 ++-- man/datashield.assign.resource.Rd | 6 +++--- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/R/datashield.aggregate.R b/R/datashield.aggregate.R index 8c9ec0c..f900cb3 100644 --- a/R/datashield.aggregate.R +++ b/R/datashield.aggregate.R @@ -9,6 +9,12 @@ #' #' @return The result of the aggregation #' +#' @examples +#'\dontrun{ +#' # call aggregate function on server side +#' datashield.aggregate(conns, expr = quote(someFunction(D, 123))) +#'} +#' #' @export datashield.aggregate <- function(conns, expr, async=TRUE) { .clearLastErrors() diff --git a/R/datashield.assign.R b/R/datashield.assign.R index 1fb42d6..ac8dc62 100644 --- a/R/datashield.assign.R +++ b/R/datashield.assign.R @@ -157,16 +157,16 @@ datashield.assign.table <- function(conns, symbol, table, variables=NULL, missin #' @examples #' \dontrun{ #' # assign a resource HOP -#' datashield.assign.resource(conn, symbol="D", resource="demo.HOP") +#' datashield.assign.resource(conn, symbol="rsrc", resource="demo.HOP") #' #' # assign the tables that are defined in the logindata ('server' and 'resource' columns are #' # expected) data frame that is used in datashield.login() function. Connections names #' # and server names must match. -#' datashield.assign.resource(conns, "D", logindata) +#' datashield.assign.resource(conns, "rsrc", logindata) #' #' # assign the resources that are defined in the provided named list. Connections names #' # and server names must match. -#' datashield.assign.resource(conns, "D", +#' datashield.assign.resource(conns, "rsrc", #' list(server1="datashield.CNSIM1", server2="datashield.CNSIM2")) #' } #' @export @@ -241,8 +241,8 @@ datashield.assign.resource <- function(conns, symbol, resource, async=TRUE) { #' #' @examples #' \dontrun{ -#' # assign a o -#' datashield.assign.expr(o, symbol="G", expr=quote(as.numeric(D$GENDER))) +#' # assign a G symbol +#' datashield.assign.expr(conns, symbol = "G", expr = quote(as.numeric(D$GENDER))) #' } #' @export datashield.assign.expr <- function(conns, symbol, expr, async=TRUE) { diff --git a/man/datashield.aggregate.Rd b/man/datashield.aggregate.Rd index a479bed..e1144d5 100644 --- a/man/datashield.aggregate.Rd +++ b/man/datashield.aggregate.Rd @@ -20,3 +20,10 @@ The result of the aggregation \description{ Aggregates the expression result using the specified aggregation method in the current Datashield session. } +\examples{ +\dontrun{ +# call aggregate function on server side +datashield.aggregate(conns, expr = quote(someFunction(D, 123))) +} + +} diff --git a/man/datashield.assign.expr.Rd b/man/datashield.assign.expr.Rd index 64ced60..c35c6bb 100644 --- a/man/datashield.assign.expr.Rd +++ b/man/datashield.assign.expr.Rd @@ -21,7 +21,7 @@ Assign the result of the execution of an expression to a R symbol in the Datashi } \examples{ \dontrun{ -# assign a o -datashield.assign.expr(o, symbol="G", expr=quote(as.numeric(D$GENDER))) +# assign a G symbol +datashield.assign.expr(conns, symbol = "G", expr = quote(as.numeric(D$GENDER))) } } diff --git a/man/datashield.assign.resource.Rd b/man/datashield.assign.resource.Rd index 5a20735..ed08d68 100644 --- a/man/datashield.assign.resource.Rd +++ b/man/datashield.assign.resource.Rd @@ -25,16 +25,16 @@ Assign a resource object of class 'ResourceClient' to a R symbol in the Datashie \examples{ \dontrun{ # assign a resource HOP -datashield.assign.resource(conn, symbol="D", resource="demo.HOP") +datashield.assign.resource(conn, symbol="rsrc", resource="demo.HOP") # assign the tables that are defined in the logindata ('server' and 'resource' columns are # expected) data frame that is used in datashield.login() function. Connections names # and server names must match. -datashield.assign.resource(conns, "D", logindata) +datashield.assign.resource(conns, "rsrc", logindata) # assign the resources that are defined in the provided named list. Connections names # and server names must match. -datashield.assign.resource(conns, "D", +datashield.assign.resource(conns, "rsrc", list(server1="datashield.CNSIM1", server2="datashield.CNSIM2")) } }