Thanks! Charles Annis, P.E.
[EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -----Original Message----- From: Phil Spector [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 1:30 PM To: Charles Annis, P.E. Subject: Re: [R] gsub difficulty Charles - Here are two ways: > string = 'one.two.three' > gsub('\\.',' ',string) [1] "one two three" > gsub('.',' ',string,fixed=TRUE) [1] "one two three" - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley [EMAIL PROTECTED] On Tue, 23 Sep 2008, Charles Annis, P.E. wrote: > 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. > > [EMAIL PROTECTED] > phone: 561-352-9699 > eFax: 614-455-3265 > http://www.StatisticalEngineering.com > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.