[R] RStudio -manipulate command

veepsirtt veepsirtt at gmail.com
Wed May 4 06:32:38 CEST 2011


Why the mean value  " h" is not changing as the slider moves from 0 to 25 ?.
It remains always constant.

library(manipulate)

example <- function(x.max){
plot(cars, xlim=c(0,x.max)) 
abline(h=mean(cars$dist),col="blue",lty=2) }

manipulate(
example(x.max), x.max=slider(0,25, step=5) )

veepsirtt

--
View this message in context: http://r.789695.n4.nabble.com/RStudio-manipulate-command-tp3474947p3494489.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list