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.
This commit is contained in:
Tom Hebbron 2013-09-04 19:56:17 +01:00
parent ee8bed8c98
commit 358f357a46

View File

@ -298,7 +298,7 @@ if (4 > 3) {
# Defined like so: # Defined like so:
jiggle <- function(x) { 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) return(x)
} }