Skip to content

Commit f1d0686

Browse files
committed
Link issues
1 parent 6c3799e commit f1d0686

57 files changed

Lines changed: 148 additions & 88 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

R/ds.contourPlot.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
#' see details.
5151
#' @param noise the percentage of the initial variance that is used as the variance of the embedded
5252
#' noise if the argument \code{method} is set to \code{'probabilistic'}. For more information see details.
53-
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
53+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
5454
#' If the \code{datasources} argument is not specified
55-
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
55+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
5656
#' @return \code{ds.contourPlot} returns a contour plot to the client-side.
5757
#' @author DataSHIELD Development Team
5858
#' @examples

R/ds.gamlss.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
#' only.
6565
#' @param newobj a character string that provides the name for the output object
6666
#' that is stored on the data servers. Default \code{gamlss_res}.
67-
#' @param datasources a list of \code{\link{DSConnection-class}}
67+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}}
6868
#' objects obtained after login. If the \code{datasources} argument is not specified
69-
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
69+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
7070
#' @return a gamlss object with all components as in the native R gamlss function.
7171
#' Individual-level information like the components y (the response response) and
7272
#' residuals (the normalised quantile residuals of the model) are not disclosed to

R/ds.getWGSR.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
#' by the formula $age_days=age_months*(365.25/12)$.
5353
#' @param newobj a character string that provides the name for the output variable
5454
#' that is stored on the data servers. Defaults \code{getWGSR.newobj}.
55-
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
55+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
5656
#' If the \code{datasources} argument is not specified the default set of connections will be
57-
#' used: see \code{\link{datashield.connections_default}}.
57+
#' used: see \code{\link[DSI]{datashield.connections_default}}.
5858
#' @return \code{ds.getWGSR} assigns a vector for each study that includes the z-scores for the
5959
#' specified index. The created vectors are stored in the servers.
6060
#' @author Demetris Avraam for DataSHIELD Development Team

R/ds.glm.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@
164164
#' of parameter estimates is returned. Default FALSE.
165165
#' @param viewCor logical. If TRUE the correlation matrix of
166166
#' parameter estimates is returned. Default FALSE.
167-
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
167+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
168168
#' If the \code{datasources} argument is not specified
169-
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
169+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
170170
#' @return Many of the elements of the output list returned by \code{ds.glm} are
171171
#' equivalent to those returned by the \code{glm()} function in native R. However,
172172
#' potentially disclosive elements

R/ds.glmSLMA.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@
181181
#' For more information see \strong{Details}.
182182
#' @param notify.of.progress specifies if console output should be produced to indicate
183183
#' progress. Default FALSE.
184-
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
184+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
185185
#' If the \code{datasources} argument is not specified
186-
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
186+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
187187
#' @return The serverside aggregate functions \code{glmSLMADS1} and \code{glmSLMADS2} return
188188
#' output to the clientside, while the assign function \code{glmSLMADS.assign} simply writes
189189
#' the glm object to the serverside

R/ds.glmerSLMA.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@
9090
#' that contains all of the variables in the GLME formula. For more information see \strong{Details}.
9191
#' @param checks logical. If TRUE \code{ds.glmerSLMA} checks the structural integrity
9292
#' of the model. Default FALSE. For more information see \strong{Details}.
93-
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
93+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
9494
#' If the \code{datasources} argument is not specified
95-
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
95+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
9696
#' @param family a character string specifying the distribution of the observed
9797
#' value of the outcome variable around the predictions generated by the linear predictor.
9898
#' This can be set as \code{"binomial"} or \code{"poisson"}.

R/ds.heatmapPlot.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
#' noise if the argument \code{method} is set to \code{'probabilistic'}.
8383
#' Default \code{noise} value is \code{0.25}.
8484
#' For more information see \strong{Details}.
85-
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
85+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
8686
#' If the \code{datasources} argument is not specified
87-
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
87+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
8888
#' @return \code{ds.heatmapPlot} returns to the client-side a heat map plot and a message specifying
8989
#' the number of invalid cells in each study.
9090
#' @author DataSHIELD Development Team

R/ds.hetcor.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#' compute each correlation using all observations with valid data for that pair of variables.
2020
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
2121
#' If the \code{datasources} argument is not specified the default set of connections will be
22-
#' used: see \code{\link{datashield.connections_default}}.
22+
#' used: see \code{\link[DSI]{datashield.connections_default}}.
2323
#' @return Returns an object of class "hetcor" from each study, with the following components: the
2424
#' correlation matrix; the type of each correlation: "Pearson", "Polychoric", or "Polyserial"; the
2525
#' standard errors of the correlations, if requested; the number (or numbers) of observations on which

R/ds.hetcor.R.save

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
c
3+
4+
5+
#'
6+
#' @title Heterogeneous Correlation Matrix
7+
#' @description This function is based on the hetcor function from the R package \code{polycor}.
8+
#' @details Computes a heterogenous correlation matrix, consisting of Pearson product-moment
9+
#' correlations between numeric variables, polyserial correlations between numeric and ordinal
10+
#' variables, and polychoric correlations between ordinal variables.
11+
#' @param data the name of a data frame consisting of factors, ordered factors, logical variables,
12+
#' character variables, and/or numeric variables, or the first of several variables.
13+
#' @param ML if TRUE, compute maximum-likelihood estimates; if FALSE (default), compute quick
14+
#' two-step estimates.
15+
#' @param std.err if TRUE (default), compute standard errors.
16+
#' @param bins number of bins to use for continuous variables in testing bivariate normality;
17+
#' the default is 4.
18+
#' @param pd if TRUE (default) and if the correlation matrix is not positive-definite, an attempt
19+
#' will be made to adjust it to a positive-definite matrix, using the nearPD function in the Matrix
20+
#' package. Note that default arguments to nearPD are used (except corr=TRUE); for more control call
21+
#' nearPD directly.
22+
#' @param use if "complete.obs", remove observations with any missing data; if "pairwise.complete.obs",
23+
#' compute each correlation using all observations with valid data for that pair of variables.
24+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
25+
#' If the \code{datasources} argument is not specified the default set of connections will be
26+
#' used: see \code{\link[DSI]{datashield.connections_default}}.
27+
#' @return Returns an object of class "hetcor" from each study, with the following components: the
28+
#' correlation matrix; the type of each correlation: "Pearson", "Polychoric", or "Polyserial"; the
29+
#' standard errors of the correlations, if requested; the number (or numbers) of observations on which
30+
#' the correlations are based; p-values for tests of bivariate normality for each pair of variables;
31+
#' the method by which any missing data were handled: "complete.obs" or "pairwise.complete.obs"; TRUE
32+
#' for ML estimates, FALSE for two-step estimates.
33+
#' @author Demetris Avraam for DataSHIELD Development Team
34+
#' @export
35+
#'
36+
ds.hetcor <- function(data=NULL, ML=TRUE, std.err=TRUE, bins=4, pd=TRUE, use="complete.obs", datasources=NULL){
37+
38+
# look for DS connections
39+
if(is.null(datasources)){
40+
datasources <- datashield.connections_find()
41+
}
42+
43+
# ensure datasources is a list of DSConnection-class
44+
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
45+
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
46+
}
47+
48+
if(is.null(data)){
49+
stop("Please provide the name of the input object!", call.=FALSE)
50+
}
51+
52+
# check if the input object is defined in all the studies
53+
defined <- isDefined(datasources, data)
54+
55+
calltext <- call('hetcorDS', data, ML, std.err, bins, pd, use)
56+
output <- DSI::datashield.aggregate(datasources, calltext)
57+
58+
return(output)
59+
60+
}

R/ds.histogram.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@
7979
#' plot. The \code{vertical.axis} argument can be set as \code{'Frequency'} or \code{'Density'}.
8080
#' Default \code{'Frequency'}.
8181
#' For more information see \strong{Details}.
82-
#' @param datasources a list of \code{\link{DSConnection-class}} objects obtained after login.
82+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
8383
#' If the \code{datasources} argument is not specified
84-
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
84+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
8585
#' @return one or more histogram objects and plots depending on the argument \code{type}
8686
#' @author DataSHIELD Development Team
8787
#' @export

0 commit comments

Comments
 (0)