ok, it will still make sense ? Le 05/02/2016 15:31, Michael Dewey a ?crit :> Assuming your dataset is in a matrix you want to transpose it. So you > can go t(mesdonnees) and then call cor on that. > > On 05/02/2016 14:06, emmanuelle morin wrote: >> Hello, >> >> I have a set of 12 individuals with thousands of variables measured. >> I understand that when I'm using the cor() function on my matrix I'm >> calculating the correlation between the different variables according to >> their values for the different individuals. >> >> What I'm willing to do is to calculate a correlation between the >> individuals and I have no clue how I can do that. >> Could you please help me ? >> >> Thanks, >> >> Emmanuelle >> >-- Emmanuelle MORIN UMR 1136 INRA/Universit? de Lorraine F-54280 Champenoux Tel : + 33 3 83 39 41 33 http://mycor.nancy.inra.fr
On 05/02/2016 17:10, emmanuelle morin wrote:> ok, it will still make sense ? >Whether it makes sense to correlate the people rather than the variables depends on the underlying science which (a) we do not know, and (b) is not really an R question.> Le 05/02/2016 15:31, Michael Dewey a ?crit : >> Assuming your dataset is in a matrix you want to transpose it. So you >> can go t(mesdonnees) and then call cor on that. >> >> On 05/02/2016 14:06, emmanuelle morin wrote: >>> Hello, >>> >>> I have a set of 12 individuals with thousands of variables measured. >>> I understand that when I'm using the cor() function on my matrix I'm >>> calculating the correlation between the different variables according to >>> their values for the different individuals. >>> >>> What I'm willing to do is to calculate a correlation between the >>> individuals and I have no clue how I can do that. >>> Could you please help me ? >>> >>> Thanks, >>> >>> Emmanuelle >>> >> >-- Michael http://www.dewey.myzen.co.uk/home.html
> -----Original Message----- > > Assuming your dataset is in a matrix you want to transpose it. So you > > can go t(mesdonnees) and then call cor on that. > > ok, it will still make sense ?If the idea does not make sense before you do it, it probably won't make more sense afterwards ... But you'll have a correlation matrix by individual, and that will show you pairs of individuals whose measures on the different variables tend to correlate more or less strongly. I can't help a suspicion that something like PCA might help more than a raw correlation matrix, if you want to see how closely individuals are associated, but correlation is a possible step on the way. S Ellison ******************************************************************* This email and any attachments are confidential. Any use, copying or disclosure other than by the intended recipient is unauthorised. If you have received this message in error, please notify the sender immediately via +44(0)20 8943 7000 or notify postmaster at lgcgroup.com and delete this message and any copies from your computer and network. LGC Limited. Registered in England 2991879. Registered office: Queens Road, Teddington, Middlesex, TW11 0LY, UK