From 39fab3ac713248e7f358ebb182cfbf228d8d3100 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 15 Dec 2015 01:34:14 +0100 Subject: Fix connecting to the UFT database --- ChangeLog | 5 +++++ DESCRIPTION | 4 ++-- R/checkexperiment.R | 2 +- R/checksubstance.R | 2 +- R/drdata.R | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ccb21e..dce0368 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-12-15 Johannes Ranke + + * Use require(RODBC) instead of requireNamespace(RODBC) as the former fails + with the message that rodbcConnectDriver is not found + 2015-10-07 Johannes Ranke * Suggest RODBC instead of depending on it, as it is not available diff --git a/DESCRIPTION b/DESCRIPTION index c98693e..61c9551 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: drfit -Version: 0.6.4 -Date: 2015-10-07 +Version: 0.6.5 +Date: 2015-12-15 Title: Dose-Response Data Evaluation Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre"), email = "jranke@uni-bremen.de")) diff --git a/R/checkexperiment.R b/R/checkexperiment.R index 8c2f472..b264243 100644 --- a/R/checkexperiment.R +++ b/R/checkexperiment.R @@ -9,7 +9,7 @@ checkexperiment <- function(id, db = "ecotox", endpoint = "%") if (!(db %in% rownames(databases))) stop("Database is not supported") - if (requireNamespace("RODBC")) { + if (require("RODBC")) { channel <- RODBC::odbcConnect(db, uid="cytotox", pwd="cytotox", case="tolower") } else { stop("For this function, the RODBC package has to be installed and configured.") diff --git a/R/checksubstance.R b/R/checksubstance.R index 3e07f92..790182f 100644 --- a/R/checksubstance.R +++ b/R/checksubstance.R @@ -11,7 +11,7 @@ checksubstance <- function(substance, db = "cytotox", experimentator = "%", if (!(db %in% rownames(databases))) stop("Database is not supported") - if (requireNamespace("RODBC")) { + if (require("RODBC")) { channel <- RODBC::odbcConnect(db, uid="cytotox", pwd="cytotox", case="tolower") } else { stop("For this function, the RODBC package has to be installed and configured.") diff --git a/R/drdata.R b/R/drdata.R index 0bf9597..eda1249 100644 --- a/R/drdata.R +++ b/R/drdata.R @@ -3,7 +3,7 @@ drdata <- function(substances, experimentator = "%", db = "cytotox", organism = "Vibrio fischeri", endpoint = "Luminescence", whereClause = "1", ok = "'ok','no fit'") { - if (requireNamespace("RODBC")) { + if (require("RODBC")) { channel <- RODBC::odbcConnect(db,uid="cytotox",pwd="cytotox",case="tolower") slist <- paste(substances,collapse="','") if (db == "cytotox") { -- cgit v1.2.1