[R] gsub difficulty

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Tue Sep 23 19:16:57 CEST 2008


Greetings R-ians:

I know what doesn’t work but I don’t know why, nor how to remedy things.

I have a character string containing "." which I want to replace with " "

gsub(".", " ", file.label) replaces the every character with a blank.

However gsub(".xls", " ", file.label) replaces ".xls" with a blank as
expected.

It appears that "." is some kind of wild-card.  How do I tell gsub that a
period is just a period?

Thanks.


Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 



More information about the R-help mailing list