aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-02-21 22:06:54 +0000
committerjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-02-21 22:06:54 +0000
commit3cdbc3b68a24455d6e7ec27353e3884d06efb442 (patch)
treeb08af4a8eecd4dde9f929c40367acdd487be1953 /R
parentfa10b85d6bb964742d2c5a3e3f633a5238c43d56 (diff)
Make the use of globalVariable() conditional on R Version >= 2.15.1,
in order to make mkin build on such R versions again. git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@70 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'R')
-rw-r--r--R/mkin_wide_to_long.R3
-rw-r--r--R/mkinerrmin.R3
-rw-r--r--R/mkinfit.R2
-rw-r--r--R/mkinresplot.R2
-rw-r--r--R/plot.mkinfit.R3
5 files changed, 8 insertions, 5 deletions
diff --git a/R/mkin_wide_to_long.R b/R/mkin_wide_to_long.R
index 8e4ec60..826aee2 100644
--- a/R/mkin_wide_to_long.R
+++ b/R/mkin_wide_to_long.R
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>
-utils::globalVariables(c("name", "value"))
+if(getRversion() >= '2.15.1') utils::globalVariables(c("name", "value"))
+
mkin_wide_to_long <- function(wide_data, time = "t")
{
colnames <- names(wide_data)
diff --git a/R/mkinerrmin.R b/R/mkinerrmin.R
index 8b1e9b2..eb9d49c 100644
--- a/R/mkinerrmin.R
+++ b/R/mkinerrmin.R
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>
-utils::globalVariables(c("name"))
+if(getRversion() >= '2.15.1') utils::globalVariables(c("name"))
+
mkinerrmin <- function(fit, alpha = 0.05)
{
parms.optim <- fit$par
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 3ca3899..1061165 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -20,7 +20,7 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>
-utils::globalVariables(c("name", "value"))
+if(getRversion() >= '2.15.1') utils::globalVariables(c("name", "value"))
mkinfit <- function(mkinmod, observed,
parms.ini = "auto",
diff --git a/R/mkinresplot.R b/R/mkinresplot.R
index f213d8a..524ba78 100644
--- a/R/mkinresplot.R
+++ b/R/mkinresplot.R
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>
-utils::globalVariables(c("variable", "residual"))
+if(getRversion() >= '2.15.1') utils::globalVariables(c("variable", "residual"))
mkinresplot <- function (object, obs_vars = vector(),
xlab = "Time", ylab = "Residual",
diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R
index 59ef861..41b4cb3 100644
--- a/R/plot.mkinfit.R
+++ b/R/plot.mkinfit.R
@@ -20,7 +20,8 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>
-utils::globalVariables(c("type", "variable", "observed"))
+if(getRversion() >= '2.15.1') utils::globalVariables(c("type", "variable", "observed"))
+
plot.mkinfit <- function(x, fit = x,
xlab = "Time", ylab = "Observed",
xlim = range(fit$data$time), ylim = c(0, max(fit$data$observed, na.rm = TRUE)),

Contact - Imprint