[R] Re moving white space help

2009-11-24 Thread Ramyathulasingam
Hi there I am trying to remove the white space and replace it with nothing but didnt have any luck with that x - and fgh- i can replace the comma using gsub gsub(\\-,,x) but i cant replace the white space with nothing. Ramya -- View this message in context:

Re: [R] Re moving white space help

2009-11-24 Thread jim holtman
Is this what you want: x -and fgh- gsub( +, , x) [1] andfgh- On Tue, Nov 24, 2009 at 4:18 PM, Ramyathulasingam ramya.thulasin...@rndsystems.com wrote: Hi  there I am trying to remove the white space and replace it with nothing but didnt have any luck with that x - and fgh- i

Re: [R] Re moving white space help

2009-11-24 Thread Henrique Dallazuanna
If I understand, you can try this: gsub(\\s+,,x) On Tue, Nov 24, 2009 at 7:18 PM, Ramyathulasingam ramya.thulasin...@rndsystems.com wrote: Hi  there I am trying to remove the white space and replace it with nothing but didnt have any luck with that x - and fgh- i can replace the comma