Hi all, I have matrix A of 67420 by 2 and another matrix B of 59199 by 2. I would like to find the number of rows of matrix B that I can find in matrix A (rows that are common to both matrices with or without sorting). I have tried the "intersection" and "is.element" functions in R but it only working for the vectors and not matrix i.e, intersection(A,B) and is.element(A,B). Any suggestions please. Oluwole [[alternative HTML version deleted]]
On Dec 2, 2011, at 4:20 AM, oluwole oyebamiji wrote:> Hi all, > I have matrix A of 67420 by 2 and another matrix B of 59199 by > 2. I would like to find the number of rows of matrix B that I can > find in matrix A (rows that are common to both matrices with or > without sorting). > > I have tried the "intersection" and "is.element" functions in R but > it only working for the vectors and not matrix > i.e, intersection(A,B) and is.element(A,B).Have you considered the 'duplicated' function? -- David Winsemius, MD West Hartford, CT
Hi all, I want to do a linear regression with lm package in MASS, my data is 59199 rows by 29 column. I got this error message can not allocate a vector of size 1.5Gb. I have read some of the previous related posting on this but I couldnt still got it right. I have an Ubuntu machine of 64bit and 4Gb ram. Any suggestion please. Oyebamiji Oluwole ________________________________ [[alternative HTML version deleted]]
On 08.02.2012 17:14, oluwole oyebamiji wrote:> Hi all, > I want to do a linear regression with lm package in MASS, my data is 59199 rows by 29 column. > I got this error message can not allocate a vector of size 1.5Gb. > I have read some of the previous related posting on this but I couldnt still got it right.Calculate the size of you model matrix. If the 29 columns are numeric, this should be a peace of cake, hence you probably model interactions or you are dealing with factors with several levels, so that you model matrix is huge. We cannot know that. Uwe Ligges> I have an Ubuntu machine of 64bit and 4Gb ram. > > Any suggestion please. > > Oyebamiji Oluwole > > > > > > > > > ________________________________ > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.