aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2018-09-15 08:03:30 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2018-09-15 08:03:30 +0200
commit074ba16b2f5a27f92492b129120d25f33cd33f70 (patch)
tree92d58607845c8530243d54476f5e8737b7b49245 /R
parent587662437bce06ea202551048226b86cff0db187 (diff)
Respect reps argument in add_err
Diffstat (limited to 'R')
-rw-r--r--R/add_err.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/add_err.R b/R/add_err.R
index 3b98338d..b2a1808e 100644
--- a/R/add_err.R
+++ b/R/add_err.R
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2017 Johannes Ranke
+# Copyright (C) 2015-2018 Johannes Ranke
# Contact: jranke@uni-bremen.de
# This file is part of the R package mkin
@@ -30,7 +30,7 @@ add_err = function(prediction, sdfunc, secondary = c("M1", "M2"),
# Generate datasets one by one in a loop
for (i in 1:n) {
- d_rep = data.frame(lapply(d_long, rep, each = 2))
+ d_rep = data.frame(lapply(d_long, rep, each = reps))
d_rep$value = rnorm(length(d_rep$value), d_rep$value, sdfunc(d_rep$value))
d_rep[d_rep$time == 0 & d_rep$name %in% secondary, "value"] <- 0

Contact - Imprint