On Tue, Nov 2, 2010 at 6:20 AM, RINNER Heinrich
wrote:
> Hello,
>
> thanks again for this nice solution using sub and regular expressions!
> However, in real life I have to overwrite more than two positions with blanks
> (say 50 or so), so I was trying to modify this in the following way:
>
>> s
") in
the replacement part, so something is wrong in my expression there. I just
can't figure out what...
Kind regards
Heinrich.
> -Ursprüngliche Nachricht-----
> Von: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
> Gesendet: Donnerstag, 28. Oktober 2010 13:40
> An
On Thu, Oct 28, 2010 at 5:26 AM, RINNER Heinrich
wrote:
> Hello,
>
> I am working with R version 2.10.1 under windows.
> In a text file, I need to replace all characters at certain column positions
> with blanks.
> For example, say the file contains two lines and looks like this:
>
> ab34cd78e
>
I'd just import the positions I like using
read.fwf()
or otherwise you can replace strings at certain positions, see ?substr
Uwe Ligges
On 28.10.2010 11:26, RINNER Heinrich wrote:
Hello,
I am working with R version 2.10.1 under windows.
In a text file, I need to replace all characters at ce
Hello,
I am working with R version 2.10.1 under windows.
In a text file, I need to replace all characters at certain column positions
with blanks.
For example, say the file contains two lines and looks like this:
ab34cd78e
fg3 hi78j
I'd like to replace everything at positions 3-4 and 7-8 with b
5 matches
Mail list logo