diff options
author | Tom Hebbron <tom@hebbron.com> | 2013-09-04 19:56:17 +0100 |
---|---|---|
committer | Tom Hebbron <tom@hebbron.com> | 2013-09-04 19:56:17 +0100 |
commit | 358f357a46f2a6c72014a9d7e5e5d6d46c4924df (patch) | |
tree | a3e70ac3510dea64c1cb387a593dceb86ca98a63 | |
parent | ee8bed8c98df81e63b430ab5e61096f8140f09b5 (diff) |
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.
-rw-r--r-- | r.html.markdown | 2 |
1 files changed, 1 insertions, 1 deletions
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) } |