If this helps, here is what I have currently

mean.p<- .5
contrast<-1
amp<- contrast*mean.p
freq<- 3
n<- 100
p<-amp*cos(2*pi*freq*(1:n)/n ) + mean.p
plot(p)
dens<-as.numeric(runif(1:n)<p)
plot(p, type="l")
points(dens, col="red")

I would like some dots having y-value=0.5 in the middle of the plot.
These will reduce the error of approximation.

Thanks for any help.

Bill

______________________________________________
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.

Reply via email to