Re: [R] as.integer question

2008-01-17 Thread Erin Hodgess
Thanks to all! This is really helpful! Sincerely, Erin On Jan 17, 2008 12:00 PM, Marc Schwartz <[EMAIL PROTECTED]> wrote: > Erin Hodgess wrote: > > Hi R People: > > > > I'm reading "Statistical Computing with R", by Maria Rizzo, and it's > > really good. > > > > Anyhow, I have a question about

Re: [R] as.integer question

2008-01-17 Thread Marc Schwartz
Erin Hodgess wrote: > Hi R People: > > I'm reading "Statistical Computing with R", by Maria Rizzo, and it's > really good. > > Anyhow, I have a question about something in there. > >> u<- runif(5) >> u > [1] 0.1177041 0.4271790 0.4601597 0.2204846 0.4051473 >> #in the book >> sum(as.integer(u> 0.4

Re: [R] as.integer question

2008-01-17 Thread Peter Dalgaard
Erin Hodgess wrote: > Hi R People: > > I'm reading "Statistical Computing with R", by Maria Rizzo, and it's > really good. > > Anyhow, I have a question about something in there. > > >> u <- runif(5) >> u >> > [1] 0.1177041 0.4271790 0.4601597 0.2204846 0.4051473 > >> #in the book >> sum

[R] as.integer question

2008-01-17 Thread Erin Hodgess
Hi R People: I'm reading "Statistical Computing with R", by Maria Rizzo, and it's really good. Anyhow, I have a question about something in there. > u <- runif(5) > u [1] 0.1177041 0.4271790 0.4601597 0.2204846 0.4051473 > #in the book > sum(as.integer(u > 0.4)) [1] 3 > #what I would do > sum(u