search for: elementfromlist

Displaying 1 result from an estimated 1 matches for "elementfromlist".

2006 Aug 07
1
Running out of memory when using lapply
Hi all! I'm afraid I programmed something totally non-sensical and inefficient, but I can't figure out how to do it better. I have a list of ~ 40 000 characters. I want to take each element at a time, map it to a large data frame with hit=which(data.frame$column==elementFromList), then compute some statistic on data.frame[hit,] and return a result that consists of either 1) a list of integers or 2) a character. res=lapply(listof40000,myfunction,dataframeToSearchIn) On a small scale, this works and returns something like str(res) [[1]] [1] "UNIQUE" [[2]] [1]...