Re: [R] How can I sample from a two-dimensional grid of points

2008-03-10 Thread Dimitris Rizopoulos
+32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: "Gregory Gentlemen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 10, 2008 3:32 PM Subject: [R] How can I sa

[R] How can I sample from a two-dimensional grid of points

2008-03-10 Thread Gregory Gentlemen
Hi everyone, My goal is to sample from a two-dimensional grid. Consider the following example of code: n.grid <- 500 muA.grid <- seq(-4,4, length=n.grid) muB.grid <- seq(-4,4, length=n.grid) mu.p <- matrix(NA, nrow=n.grid, ncol=n.grid) for(i in 1:n.grid){ for(j in 1:n.grid){ mu.p