Skip to content

Replacing dot with empty space

4 messages · Sergey Goriatchev, Gabor Grothendieck

#
Hello, everyone

How do I replace dot with empty space in "ED4.Comdty"?
I need to get "ED4 Comdty"
tried sub() in many different ways, like sub({.}, " ", "ED4.Comdty")
etc but could not do it.

Thanks in advance,
Sergey
#
OK, got it now:
sub("[.]", " ", "ED4.Comdty")
On Tue, Feb 10, 2009 at 10:01, Sergey Goriatchev <sergeyg at gmail.com> wrote:

  
    
#
Also, try these alternatives:

sub(".", " ", x, fixed = TRUE)
chartr(".", " ", x)
On Tue, Feb 10, 2009 at 4:02 AM, Sergey Goriatchev <sergeyg at gmail.com> wrote:
#
Thanks, Gabor.
You are always very helpful.

On Tue, Feb 10, 2009 at 12:42, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote: