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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.