[R] Multiple String word replacements: Performance Issue

2013-11-06 Thread Simon Pickert
Dear experts, I’ve been on this for weeks now, and couldn’t find a solution..Sorry for the long description. I figured I post many details, so you get the problem entirely, although it’s not hard to grasp. **Situation:** Data frame consisting of 4 million entries (total size: 250 MB). Two

Re: [R] speed issue: gsub on large data frame

2013-11-05 Thread Simon Pickert
--- Sent from my phone. Please excuse my brevity. Simon Pickert simon.pick...@t-online.de wrote: Hi R’lers, I’m running into speeding issues, performing a bunch of „gsub(patternvector, [token],dataframe$text_column) on a data frame containing 4millionentries

Re: [R] speed issue: gsub on large data frame

2013-11-05 Thread Simon Pickert
/minutes/hours. Sent from my iPad On Nov 5, 2013, at 3:13, Simon Pickert simon.pick...@t-online.de wrote: How’s that not reproducible? 1. Data frame, one column with text strings 2. Size of data frame= 4million observations 3. A bunch of gsubs in a row ( gsub(patternvector, “[token

Re: [R] How can I use muliple cores of CPU in Windows or OS X?

2013-11-05 Thread Simon Pickert
Mcapply from package 'parallel'. Also see package 'multicore' Am 06.11.2013 um 00:01 schrieb Agony agony_...@yahoo.com: Dear all, I have about 50 pages of R codes and ran it in both OS X and Windows. It takes at least haft a day to have the results. The running time is not very

[R] speed issue: gsub on large data frame

2013-11-04 Thread Simon Pickert
Hi R’lers, I’m running into speeding issues, performing a bunch of „gsub(patternvector, [token],dataframe$text_column) on a data frame containing 4millionentries. (The “patternvectors“ contain up to 500 elements) Is there any better/faster way than performing like 20 gsub commands in a row?

[R] Placeholders for String Operations

2013-09-04 Thread Simon Pickert
Hi all, what are the placeholders for string operations/modifications? Is there a placeholder for numbers, which would allow me to easily replace all numbers in a string? Something like text1 - c(this is a number 23%) text2 - c(this is not a number bla%) newtext1 - gsub(#%, [percentagevalue],