From 358f357a46f2a6c72014a9d7e5e5d6d46c4924df Mon Sep 17 00:00:00 2001 From: Tom Hebbron Date: Wed, 4 Sep 2013 19:56:17 +0100 Subject: Update r.html.markdown Fixed a problem with the jiggle function - variable x wasn't being updated before being returned, and the rnorm function was being asked to return x output values, rather than one. After testing, the values given the documentation are now correct. --- r.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'r.html.markdown') diff --git a/r.html.markdown b/r.html.markdown index 03aa1dd2..9c17e8ca 100644 --- a/r.html.markdown +++ b/r.html.markdown @@ -298,7 +298,7 @@ if (4 > 3) { # Defined like so: jiggle <- function(x) { - x+ rnorm(x, sd=.1) #add in a bit of (controlled) noise + x = x + rnorm(1, sd=.1) #add in a bit of (controlled) noise return(x) } -- cgit v1.2.3