From 1b4922c972635ebaca37782dab8c9f7b59244f2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 2 Oct 2026 05:10:41 +0000 Subject: [PATCH 1/2] docs: apply roxygen suggestion for R/ds.acmPlot.R --- R/ds.acmPlot.R | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/R/ds.acmPlot.R b/R/ds.acmPlot.R index ff74892..d2b3f43 100644 --- a/R/ds.acmPlot.R +++ b/R/ds.acmPlot.R @@ -1,12 +1,6 @@ #' @title Client-side function to generate hazard ratio plots in DataSHIELD -#' @description This function creates a ggplot visualization for hazard ratio analysis -#' by getting the prediction data from the server-side acmPlotDS function. -#' -#' @details This function takes a prediction object created by ds.Predict and generates -#' a customizable ggplot visualization. The function allows customization of colors, -#' line sizes, axis labels, and more. -#' -#' +#' @description Builds a ggplot2 hazard ratio curve for each connected study, using prediction data fetched from the DataSHIELD server. Plot appearance (colors, line sizes, axis labels) can be customized. +#' @details This function sends a request to the server to extract prediction data from an object previously created with ds.Predict, then builds the plot locally with ggplot2 (using rms for underlying plot support). Server function called: `acmPlotDS`. If x_breaks is not supplied, five evenly spaced breaks are computed from the range of the first column of each study's returned prediction data. #' @param pred_obj character string specifying the name of prediction object on the server-side #' created using ds.Predict() #' @param outcome_name character string specifying the outcome name (e.g., "ACM", "CVD") (default: "ACM") @@ -14,12 +8,12 @@ #' @param line_size size of the main line (default: 2) #' @param ref_line_color color for the reference line (default: "brown") #' @param ref_line_size size of the reference line (default: 1.5) -#' @param x_breaks numeric vector for x-axis breaks (optional) +#' @param x_breaks Optional numeric vector of x-axis tick positions; if NULL, five evenly spaced breaks are computed from each study's data range. #' @param x_label label for x-axis (default: "Primary exposure") #' @param y_label label for y-axis (default: "Hazard ratio") -#' @param event_n number of events (optional) +#' @param event_n Optional numeric value giving the number of events; if supplied, it is appended to the plot title as "(n = event_n)". #' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login -#' @return a list of ggplot objects from each study +#' @return Returns a list of ggplot objects, one per study/connection in datasources, each built from the prediction summary data returned by the server (no individual-level data leaves the server). #' @author Xavier EscribĂ  Montagut, 2025 #' @examples #' \dontrun{ From bdf2d82cc3c283edbd9f915a5487eaee5b8e331a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 2 Oct 2026 05:37:32 +0000 Subject: [PATCH 2/2] docs: apply roxygen suggestion for R/ds.acmPlot.R --- R/ds.acmPlot.R | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/R/ds.acmPlot.R b/R/ds.acmPlot.R index 8d7001a..e1d55d6 100644 --- a/R/ds.acmPlot.R +++ b/R/ds.acmPlot.R @@ -1,13 +1,6 @@ #' @title Client-side function to generate hazard ratio plots in DataSHIELD -#' @description This function creates a ggplot visualization for hazard ratio analysis -#' by getting the prediction data from the server-side acmPlotDS function. -#' -#' @details This function takes a prediction object created by ds.Predict and generates -#' a customizable ggplot visualization. The function allows customization of colors, -#' line sizes, axis labels, and more. -#' -#' -#' +#' @description Builds a ggplot hazard ratio curve per study using prediction data retrieved from a server-side prediction object. +#' @details This function calls the server-side aggregate function to retrieve summarized prediction data for a named server-side object, then builds one ggplot2 plot per study locally in R using ggplot2::ggplot, geom_line, geom_hline, and related layers. It also relies on the rms package being available locally for plotting support. Server function called: `acmPlotDS`. #' @param pred_obj character string specifying the name of prediction object on the server-side #' created using ds.Predict() #' @param outcome_name character string specifying the outcome name (e.g., "ACM", "CVD") (default: "ACM") @@ -15,12 +8,12 @@ #' @param line_size size of the main line (default: 2) #' @param ref_line_color color for the reference line (default: "brown") #' @param ref_line_size size of the reference line (default: 1.5) -#' @param x_breaks Optional numeric vector of x-axis tick positions; if NULL, five evenly spaced breaks are computed from each study's data range. +#' @param x_breaks Optional numeric vector of x-axis tick positions; if NULL, breaks are computed automatically as five evenly spaced values across the observed x range for each study. #' @param x_label label for x-axis (default: "Primary exposure") #' @param y_label label for y-axis (default: "Hazard ratio") -#' @param event_n Optional numeric value giving the number of events; if supplied, it is appended to the plot title as "(n = event_n)". +#' @param event_n number of events (optional) #' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login -#' @return Returns a list of ggplot objects, one per study/connection in datasources, each built from the prediction summary data returned by the server (no individual-level data leaves the server). +#' @return Returns a plain R list of ggplot objects, one per study/data source, built from the aggregated prediction data; no additional disclosure control is applied within this function since only already-aggregated summary data is used for plotting. #' @author Xavier EscribĂ  Montagut, 2025 #' @examples #' \dontrun{