Re: [R] A coding question involving variable assignments

From: xpRt.wannabe <xprt.wannabe_at_gmail.com>
Date: Fri 12 Aug 2005 - 14:47:51 EST

Thank you! That was helpful.

Another thing I learned was that I would need to do set.seed(99) not once but twice in this context.

On 8/11/05, ecatchpole <e.catchpole@adfa.edu.au> wrote:
> On 12/08/05 13:27, xpRt.wannabe wrote,:
> > Ted and List,
> >
> > What I need is I need to know what max of rnorm(rpois(1,10)) is before
> > R does sum(), replicate(10, ...) and replicate(5, ...).
> >
> > The fact that you have set.seed(99) twice, does that mean, say, entry
> > [1,1] 0.4896243 in 'mx' is one of the z number of values generated by
> > rnorm(rpois(1,10)) that add up to [1,1] -2.0071674 in 'x'? Another
> > way to ask the question, I guess, is, by doing set.seed(99) twice are
> > the values generated by rnorm(rpois(1,10)) for 'x' same as those for
> > 'mx'?
>
> Yes, that's the reason for having a set.seed() function.
>
> Ted.
>
> --
> Dr E.A. Catchpole
> Visiting Fellow
> Univ of New South Wales at ADFA, Canberra, Australia
> and University of Kent, Canterbury, England
> - www.ma.adfa.edu.au/~eac
> - fax: +61 2 6268 8786
> - ph: +61 2 6268 8895
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 12 14:52:54 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:15:40 EST