Re: [R] Random Relabelling

2011-04-25 Thread kmatthews
/SendEmail.jtp?type=nodenode=3463799i=0by-user=t wrote: From: Kevin Matthews [hidden email]http://user/SendEmail.jtp?type=nodenode=3463799i=1by-user=t Subject: Re: [R] Random Relabelling To: John Kane [hidden email]http://user/SendEmail.jtp?type=nodenode=3463799i=2by-user=t Cc: [hidden

Re: [R] Random Relabelling

2011-04-25 Thread David Winsemius
On Apr 25, 2011, at 10:53 AM, kmatthews wrote: Thanks to everyone... this helps a lot. Just a quick question about etiquette in this forum (as it my first time questioning)... are notes of gratitude usually given in these forums? The practice varies, some people do appreciate it. Doing

Re: [R] Random Relabelling

2011-04-25 Thread John Kane
--- On Mon, 4/25/11, kmatthews kevin-matth...@uiowa.edu wrote: From: kmatthews kevin-matth...@uiowa.edu Subject: Re: [R] Random Relabelling To: r-help@r-project.org Received: Monday, April 25, 2011, 10:53 AM Thanks to everyone... this helps a lot.  Just a quick question about etiquette

Re: [R] Random Relabelling

2011-04-23 Thread John Kane
I KNEW there was a better way! --- On Wed, 4/20/11, Jeremy Hetzel jthet...@gmail.com wrote: From: Jeremy Hetzel jthet...@gmail.com Subject: Re: [R] Random Relabelling To: r-help-arch...@googlegroups.com Cc: r-help@r-project.org, Kevin Matthews kevin-matth...@uiowa.edu Received: Wednesday

Re: [R] Random Relabelling

2011-04-23 Thread Peter Ehlers
On 2011-04-23 03:42, John Kane wrote: I KNEW there was a better way! --- On Wed, 4/20/11, Jeremy Hetzeljthet...@gmail.com wrote: From: Jeremy Hetzeljthet...@gmail.com Subject: Re: [R] Random Relabelling To: r-help-arch...@googlegroups.com Cc: r-help@r-project.org, Kevin Matthewskevin-matth

[R] Random Relabelling

2011-04-20 Thread kmatthews
I have 4000 observations that I need to randomly relabel 1000 times and then calculate the mean of the 1000 values at each of the 4000 points. Any ideas for where to begin? Thanks Kevin -- View this message in context: http://r.789695.n4.nabble.com/Random-Relabelling-tp3463100p3463100.html

Re: [R] Random Relabelling

2011-04-20 Thread John Kane
Subject: [R] Random Relabelling To: r-help@r-project.org Received: Wednesday, April 20, 2011, 10:04 AM I have 4000 observations that I need to randomly relabel 1000 times and then calculate the mean of the 1000 values at each of the 4000 points.  Any ideas for where to begin? Thanks Kevin

Re: [R] Random Relabelling

2011-04-20 Thread John Kane
) { mydata[,i] - sample(scores, 5, replace=FALSE) } = --- On Wed, 4/20/11, Kevin Matthews kevin-matth...@uiowa.edu wrote: From: Kevin Matthews kevin-matth...@uiowa.edu Subject: Re: [R] Random Relabelling To: John Kane jrkrid...@yahoo.ca Cc: r

Re: [R] Random Relabelling

2011-04-20 Thread Jeremy Hetzel
...@uiowa.edu Subject: Re: [R] Random Relabelling To: John Kane jrkr...@yahoo.ca Cc: r-h...@r-project.org Received: Wednesday, April 20, 2011, 1:22 PM I have a map of Iowa of with 4000 locations. At each location, I have a cancer mortality rate. I need to test my null hypothesis; that the spatial

Re: [R] Random Relabelling

2011-04-20 Thread Kevin Matthews
Subject: [R] Random Relabelling To: r-help@r-project.org Received: Wednesday, April 20, 2011, 10:04 AM I have 4000 observations that I need to randomly relabel 1000 times and then calculate the mean of the 1000 values at each of the 4000 points. Any ideas for where to begin? Thanks

Re: [R] Random Relabelling

2011-04-20 Thread Dennis Murphy
Hi: How about y - rnorm(4000) ymat - rowMeans(replicate(1000, y[sample(4000)])) hist(ymeans) system.time({y - rnorm(4000); yy - rowMeans(replicate(1000, y[sample(4000)]))}) user system elapsed 0.190.030.22 HTH, Dennis On Wed, Apr 20, 2011 at 7:04 AM, kmatthews