Re: [R] all combinations of the elements of two vectors

2011-08-29 Thread Campbell, Desmond
it to reconfigure the matrix's shape to any that contains the same number of elements. Thanks very much one and all. Regards Desmond -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: 29 August 2011 07:24 To: Campbell, Desmond Cc: r-help@R-project.org Subject: Odp: [R] all

[R] all combinations of the elements of two vectors

2011-08-27 Thread Campbell, Desmond
Dear R-help readers, I'm sure this problem has been answered but I can't find the solution. I have two vectors v1 - c(a,b) v2 - c(1,2,3) I want an easy way to produce every possible combination of v1, v2 elements Ie I want to produce c(a1,a2,a3, b1,b2,b3) regards Desmond Desmond Campbell Dept

Re: [R] all combinations of the elements of two vectors

2011-08-27 Thread Campbell, Desmond
:19 To: Campbell, Desmond Cc: r-help@R-project.org Subject: Re: [R] all combinations of the elements of two vectors Hi Desmond, You might try sort(apply(expand.grid(v1, v2), 1, paste, collapse = , sep = )) [1] a1 a2 a3 b1 b2 b3 HTH, Jorge On Sat, Aug 27, 2011 at 12:54 PM, Campbell, Desmond

[R] test for whether dataset comes from a known MVN

2007-10-11 Thread Campbell, Desmond
Dear all, I have a multivariate dataset containing 100,000 or more points. I want find the p-value for the dataset of points coming from a particular multivariate normal distribution With mean vector u Covariance matrix s2 So H0: points ~ MVN( u, s2) H1: points not ~ MVN( u, s2) How do