Skip to content

Commit 2c142e9

Browse files
Merge pull request datashield#367 from datashield/v6.1.2-dev
Fixed 'datasource' test
2 parents 7c56cfc + 4799b6d commit 2c142e9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

R/ds.scatterPlot.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ ds.scatterPlot <- function (x=NULL, y=NULL, method='deterministic', k=3, noise=0
133133
stop("Please provide the name of the x-variable", call.=FALSE)
134134
}
135135

136-
# ensure datasources is a list of DSConnection-class
137-
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
138-
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
139-
}
140-
141136
if(is.null(y)){
142137
stop("Please provide the name of the y-variable", call.=FALSE)
143138
}
@@ -147,6 +142,11 @@ ds.scatterPlot <- function (x=NULL, y=NULL, method='deterministic', k=3, noise=0
147142
datasources <- datashield.connections_find()
148143
}
149144

145+
# ensure datasources is a list of DSConnection-class
146+
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
147+
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
148+
}
149+
150150
# the input variable might be given as column table (i.e. D$object)
151151
# or just as a vector not attached to a table (i.e. object)
152152
# we have to make sure the function deals with each case

0 commit comments

Comments
 (0)