Re: [R] Sampling with conditions

2011-11-08 Thread SarahJoyes
Dan Nordlund, Dan (DSHS/RDA) wrote: > >> -Original Message- >> From: r-help-bounces@ [mailto:r-help-bounces@r- >> project.org] On Behalf Of SarahJoyes >> Sent: Tuesday, November 08, 2011 5:57 AM >> To: r-help@ >> Subject: Re: [R] Sampling with c

Re: [R] Sampling with conditions

2011-11-08 Thread SarahJoyes
That is exactly what I want, and it's so simple! Thanks so much! -- View this message in context: http://r.789695.n4.nabble.com/Sampling-with-conditions-tp4014036p4016050.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

Re: [R] Sampling with conditions

2011-11-08 Thread SarahJoyes
Sorry about being confusing, I have so many loops in loops and ifelses that I get mixed up sometimes, it was just a typo, it was supposed to be "for(i in 1:5)" Sorry, Thanks for you help! SJ -- View this message in context: http://r.789695.n4.nabble.com/Sampling-with-conditions-tp4014036p40

[R] Sampling with conditions

2011-11-07 Thread SarahJoyes
Hey everyone, I am at best, an amateur user of R, but I am stuck on how to set-up the following situation. I am trying to select a random sample of numbers from 0 to 10 and insert them into the first column of a matrix (which will used later in a loop). However, I need to have those numbers add u