-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathds.colnames.Rd
More file actions
69 lines (62 loc) · 2.35 KB
/
ds.colnames.Rd
File metadata and controls
69 lines (62 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ds.colnames.R
\name{ds.colnames}
\alias{ds.colnames}
\title{Produces column names of the R object in the server-side}
\usage{
ds.colnames(x = NULL, datasources = NULL)
}
\arguments{
\item{x}{a character string providing the name of the input data frame or matrix.}
\item{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}}.}
}
\value{
\code{ds.colnames} returns the column names of
the specified server-side data frame or matrix.
}
\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}.
Server function called: \code{colnamesDS}
}
\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&",
table = "CNSIM.CNSIM1", driver = "OpalDriver")
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&",
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")
# 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)
}
}
\seealso{
\code{\link{ds.dim}} to obtain the dimensions of a matrix or a data frame.
}
\author{
DataSHIELD Development Team
}