> The code I've attached works for a population of 400 and samples 100 times.
> I'd like to extend this to 300 samples and 3 populations. So, the x-axis would
> range from 0-300 samples.
> What I'm having trouble with is finding a way to change the population mid-
> way through the function. I want samples 1-100 to be taken from a
> population of 400, samples 101-200 to be taken from a sample of 800 and
> samples 201-300 from a population of 300. The end result should look
> something like a heart rate monitor.

You could write your function to take a list of either subpopulations or sets 
of population parameters, lapply your simulation generator over the list and 
(assuming the output from each of those is a vector) use c(that.list, 
recursive=TRUE) to concatenate the resulting list of vectors into a single 

S Ellison

This email and any attachments are confidential. Any use...{{dropped:8}}

R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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