search for: 132e6

Displaying 1 result from an estimated 1 matches for "132e6".

Did you mean: 132,6
2011 May 30
3
ideas about how to reduce RAM & improve speed in trying to use lapply(strsplit())
...c('18x.6','12x.9','302x.3') I want to get a vector that is c('18x','12x','302x') This is easily done using this code: unlist(lapply(strsplit(x,".",fixed=TRUE),function(x) x[1])) So far so good. The problem is that x is a vector of length 132e6. When I run the above code, it runs for > 30 minutes, and it takes > 23 Gb RAM (no kidding!). Does anyone have ideas about how to speed up the code above and (more importantly) reduce the RAM footprint? I'd prefer not to change the file on disk using, e.g., awk, but I will do that as a l...