[R] loop for a large database
mari681
marianna.bolognesi at gmail.com
Sun Feb 26 13:13:49 CET 2012
Yes, I am a newbie.
I have a data.frame (MyTable) of 1445846 rows and 15 columns with
character data.
And a character vector (MyVector) of 473491 elements.
I want simply to get a data.frame with the count of how many times each
element of MyVector appears in MyTable.
I've tried a loop with : for (i in 1 : length (myvector)) sum (MyTable== i)
but it crashes my computer.
I've also tried something like
x <- 1 : length (MyVector)
apply (MyTable , 1 , function(x) {sum (MyTable ==x)}
but doesn't work.
Any idea?
Thank you. AAAAAny suggestion is super welcome.
Marianna
--
View this message in context: http://r.789695.n4.nabble.com/loop-for-a-large-database-tp4422052p4422052.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list