diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-11-17 18:14:32 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-11-17 18:23:31 +0100 |
commit | f3f415520c89f9d8526bf6fadc862ebd44be220d (patch) | |
tree | e80d26e3b4f56ebe872888bed8f01a21d49b7ff4 /R/add_err.R | |
parent | f52fffd9eab13b7902bf767dd9cd7f0e7abf8069 (diff) |
Remove trailing whitespace, clean headers
Also ignore test.R in the top level directory, as it is not meant to
be public
Diffstat (limited to 'R/add_err.R')
-rw-r--r-- | R/add_err.R | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/R/add_err.R b/R/add_err.R index 0995e634..4d998e94 100644 --- a/R/add_err.R +++ b/R/add_err.R @@ -16,8 +16,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/> -add_err = function(prediction, sdfunc, - n = 1000, LOD = 0.1, reps = 2, +add_err = function(prediction, sdfunc, + n = 1000, LOD = 0.1, reps = 2, digits = 1, seed = NA) { if (!is.na(seed)) set.seed(seed) @@ -32,7 +32,7 @@ add_err = function(prediction, sdfunc, for (i in 1:n) { d_rep = data.frame(lapply(d_long, rep, each = 2)) 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% c("M1", "M2"), "value"] <- 0 # Set values below the LOD to NA |