Skip to content

Commit 92c58ff

Browse files
committed
revert whitespace changes
1 parent 9ba8796 commit 92c58ff

22 files changed

+555
-555
lines changed

R/ds.abs.R

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#'
22
#' @title Computes the absolute values of a variable
3-
#' @description Computes the absolute values for a specified numeric or integer vector.
3+
#' @description Computes the absolute values for a specified numeric or integer vector.
44
#' This function is similar to R function \code{abs}.
5-
#' @details The function calls the server-side function \code{absDS} that computes the
6-
#' absolute values of the elements of a numeric or integer vector and assigns a new vector
7-
#' with those absolute values on the server-side. The name of the new generated vector is
5+
#' @details The function calls the server-side function \code{absDS} that computes the
6+
#' absolute values of the elements of a numeric or integer vector and assigns a new vector
7+
#' with those absolute values on the server-side. The name of the new generated vector is
88
#' specified by the user through the argument \code{newobj}, otherwise is named by default to
99
#' \code{abs.newobj}.
1010
#' @param x a character string providing the name of a numeric or an integer vector.
1111
#' @param newobj a character string that provides the name for the output variable
12-
#' that is stored on the data servers. Default name is set to \code{abs.newobj}.
13-
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
12+
#' that is stored on the data servers. Default name is set to \code{abs.newobj}.
13+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login.
1414
#' If the \code{datasources} argument is not specified the default set of connections will be
1515
#' used: see \code{\link[DSI]{datashield.connections_default}}.
1616
#' @return \code{ds.abs} assigns a vector for each study that includes the absolute values of
@@ -22,42 +22,42 @@
2222
#' \dontrun{
2323
#'
2424
#' # Connecting to the Opal servers
25-
#'
25+
#'
2626
#' require('DSI')
2727
#' require('DSOpal')
2828
#' require('dsBaseClient')
29-
#'
29+
#'
3030
#' builder <- DSI::newDSLoginBuilder()
31-
#' builder$append(server = "study1",
32-
#' url = "http://192.168.56.100:8080/",
33-
#' user = "administrator", password = "datashield_test&",
31+
#' builder$append(server = "study1",
32+
#' url = "http://192.168.56.100:8080/",
33+
#' user = "administrator", password = "datashield_test&",
3434
#' table = "CNSIM.CNSIM1", driver = "OpalDriver")
35-
#' builder$append(server = "study2",
36-
#' url = "http://192.168.56.100:8080/",
37-
#' user = "administrator", password = "datashield_test&",
35+
#' builder$append(server = "study2",
36+
#' url = "http://192.168.56.100:8080/",
37+
#' user = "administrator", password = "datashield_test&",
3838
#' table = "CNSIM.CNSIM2", driver = "OpalDriver")
3939
#' builder$append(server = "study3",
40-
#' url = "http://192.168.56.100:8080/",
41-
#' user = "administrator", password = "datashield_test&",
40+
#' url = "http://192.168.56.100:8080/",
41+
#' user = "administrator", password = "datashield_test&",
4242
#' table = "CNSIM.CNSIM3", driver = "OpalDriver")
43-
#'
43+
#'
4444
#' logindata <- builder$build()
45-
#'
45+
#'
4646
#' # Log onto the remote Opal training servers
47-
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
48-
#'
47+
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
48+
#'
4949
#' # Example 1: Generate a normally distributed variable with zero mean and variance equal
5050
#' # to one and then get their absolute values
5151
#' ds.rNorm(samp.size=100, mean=0, sd=1, newobj='var.norm', datasources=connections)
5252
#' # check the quantiles
5353
#' ds.summary(x='var.norm', datasources=connections)
5454
#' ds.abs(x='var.norm', newobj='var.norm.abs', datasources=connections)
5555
#' # check now the changes in the quantiles
56-
#' ds.summary(x='var.norm.abs', datasources=connections)
56+
#' ds.summary(x='var.norm.abs', datasources=connections)
5757
#'
5858
#' # Example 2: Generate a sequence of negative integer numbers from -200 to -100
5959
#' # and then get their absolute values
60-
#' ds.seq(FROM.value.char = '-200', TO.value.char = '-100', BY.value.char = '1',
60+
#' ds.seq(FROM.value.char = '-200', TO.value.char = '-100', BY.value.char = '1',
6161
#' newobj='negative.integers', datasources=connections)
6262
#' # check the quantiles
6363
#' ds.summary(x='negative.integers', datasources=connections)
@@ -66,7 +66,7 @@
6666
#' ds.summary(x='positive.integers', datasources=connections)
6767
#'
6868
#' # clear the Datashield R sessions and logout
69-
#' datashield.logout(connections)
69+
#' datashield.logout(connections)
7070
#'
7171
#' }
7272
#'

R/ds.asCharacter.R

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
#'
1+
#'
22
#' @title Converts a server-side R object into a character class
3-
#' @description Converts the input object into a character class.
3+
#' @description Converts the input object into a character class.
44
#' This function is based on the native R function \code{as.character}.
5-
#' @details
5+
#' @details
66
#' Server function called: \code{asCharacterDS}
7-
#'
7+
#'
88
#' @param x.name a character string providing the name of the input object to be coerced to class
99
#' character.
1010
#' @param newobj a character string that provides the name for the output object
11-
#' that is stored on the data servers. Default \code{ascharacter.newobj}.
12-
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}}
11+
#' that is stored on the data servers. Default \code{ascharacter.newobj}.
12+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}}
1313
#' objects obtained after login. If the \code{datasources} argument is not specified
1414
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
15-
#' @return \code{ds.asCharacter} returns the object converted into a class character
15+
#' @return \code{ds.asCharacter} returns the object converted into a class character
1616
#' that is written to the server-side.
17-
#' @examples
17+
#' @examples
1818
#' \dontrun{
1919
#' ## Version 6, for version 5 see the Wiki
20-
#'
20+
#'
2121
#' # connecting to the Opal servers
22-
#'
22+
#'
2323
#' require('DSI')
2424
#' require('DSOpal')
2525
#' require('dsBaseClient')
2626
#'
2727
#' builder <- DSI::newDSLoginBuilder()
28-
#' builder$append(server = "study1",
29-
#' url = "http://192.168.56.100:8080/",
30-
#' user = "administrator", password = "datashield_test&",
28+
#' builder$append(server = "study1",
29+
#' url = "http://192.168.56.100:8080/",
30+
#' user = "administrator", password = "datashield_test&",
3131
#' table = "CNSIM.CNSIM1", driver = "OpalDriver")
32-
#' builder$append(server = "study2",
33-
#' url = "http://192.168.56.100:8080/",
34-
#' user = "administrator", password = "datashield_test&",
32+
#' builder$append(server = "study2",
33+
#' url = "http://192.168.56.100:8080/",
34+
#' user = "administrator", password = "datashield_test&",
3535
#' table = "CNSIM.CNSIM2", driver = "OpalDriver")
3636
#' builder$append(server = "study3",
37-
#' url = "http://192.168.56.100:8080/",
38-
#' user = "administrator", password = "datashield_test&",
37+
#' url = "http://192.168.56.100:8080/",
38+
#' user = "administrator", password = "datashield_test&",
3939
#' table = "CNSIM.CNSIM3", driver = "OpalDriver")
4040
#' logindata <- builder$build()
41-
#'
42-
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
43-
#'
41+
#'
42+
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
43+
#'
4444
#' # Converting the R object into a class character
4545
#' ds.asCharacter(x.name = "D$LAB_TSC",
4646
#' newobj = "char.obj",
4747
#' datasources = connections[1]) #only the first Opal server is used ("study1")
48-
#'
49-
#' # Clear the Datashield R sessions and logout
50-
#' datashield.logout(connections)
51-
#'
52-
#' }
48+
#'
49+
#' # Clear the Datashield R sessions and logout
50+
#' datashield.logout(connections)
51+
#'
52+
#' }
5353
#' @author DataSHIELD Development Team
5454
#' @export
55-
#'
55+
#'
5656
ds.asCharacter <- function(x.name=NULL, newobj=NULL, datasources=NULL){
5757

5858
datasources <- .set_datasources(datasources)
5959

6060
if(is.null(x.name)){
6161
stop("Please provide the name of the input vector!", call.=FALSE)
6262
}
63-
63+
6464
if(is.null(newobj)){
6565
newobj <- "ascharacter.newobj"
6666
}
6767

68-
calltext <- call("asCharacterDS", x.name)
69-
DSI::datashield.assign(datasources, newobj, calltext)
68+
calltext <- call("asCharacterDS", x.name)
69+
DSI::datashield.assign(datasources, newobj, calltext)
7070

7171
}

R/ds.asDataMatrix.R

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
#' @title Converts a server-side R object into a matrix
1+
#' @title Converts a server-side R object into a matrix
22
#' @description Coerces an R object into a matrix maintaining original
3-
#' class for all columns in data frames.
4-
#' @details This function is based on the native R function \code{data.matrix}.
5-
#'
3+
#' class for all columns in data frames.
4+
#' @details This function is based on the native R function \code{data.matrix}.
5+
#'
66
#' Server function called: \code{asDataMatrixDS}.
7-
#' @param x.name a character string providing the name of the input object to be coerced to
8-
#' a matrix.
7+
#' @param x.name a character string providing the name of the input object to be coerced to
8+
#' a matrix.
99
#' @param newobj a character string that provides the name for the output object
1010
#' that is stored on the data servers. Default \code{asdatamatrix.newobj}.
11-
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}}
11+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}}
1212
#' objects obtained after login. If the \code{datasources} argument is not specified
1313
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
14-
#' @return \code{ds.asDataMatrix} returns the object converted into a matrix
14+
#' @return \code{ds.asDataMatrix} returns the object converted into a matrix
1515
#' that is written to the server-side.
16-
#' @examples
16+
#' @examples
1717
#' \dontrun{
1818
#' ## Version 6, for version 5 see the Wiki
19-
#'
19+
#'
2020
#' # connecting to the Opal servers
21-
#'
21+
#'
2222
#' require('DSI')
2323
#' require('DSOpal')
2424
#' require('dsBaseClient')
2525
#'
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-
#'
41-
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
42-
#'
40+
#'
41+
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
42+
#'
4343
#' # Converting the R object into a matrix
4444
#' ds.asDataMatrix(x.name = "D",
4545
#' newobj = "mat.obj",
4646
#' datasources = connections[1]) #only the first Opal server is used ("study1")
47-
#'
48-
#' # Clear the Datashield R sessions and logout
49-
#' datashield.logout(connections)
50-
#'
51-
#' }
47+
#'
48+
#' # Clear the Datashield R sessions and logout
49+
#' datashield.logout(connections)
50+
#'
51+
#' }
5252
#' @author DataSHIELD Development Team
5353
#' @export
54-
#'
54+
#'
5555
ds.asDataMatrix <- function(x.name=NULL, newobj=NULL, datasources=NULL){
5656

5757
datasources <- .set_datasources(datasources)
5858

5959
if(is.null(x.name)){
6060
stop("Please provide the name of the input vector!", call.=FALSE)
6161
}
62-
62+
6363
if(is.null(newobj)){
6464
newobj <- "asdatamatrix.newobj"
6565
}
6666

67-
calltext <- call("asDataMatrixDS", x.name)
68-
DSI::datashield.assign(datasources, newobj, calltext)
67+
calltext <- call("asDataMatrixDS", x.name)
68+
DSI::datashield.assign(datasources, newobj, calltext)
6969

7070
}

0 commit comments

Comments
 (0)