Re: [R] dir() and RegEx and gsub()

2005-06-10 Thread Hans-Peter
2005/6/9, Sarah Goslee [EMAIL PROTECTED]: Under R, for reasons I've never quite understood, \\. evaluates to . Thanks to the answers of B. Ripley and Gabor I think, I understand now: 1) the patter-string \\.csv$ gives the regular expression \.csv$ 2) now the backslash lets the dot to be

Re: [R] dir() and RegEx and gsub()

2005-06-10 Thread Uwe Ligges
Hans-Peter wrote: 2005/6/9, Sarah Goslee [EMAIL PROTECTED]: Under R, for reasons I've never quite understood, \\. evaluates to . Thanks to the answers of B. Ripley and Gabor I think, I understand now: 1) the patter-string \\.csv$ gives the regular expression \.csv$ 2) now the

[R] dir() and RegEx and gsub()

2005-06-09 Thread Hans-Peter
Dear R-Users, I have two questions: a) in a directory there are 3 files: [1] Data.~csvKopie von Data.~csv VorlageTradefile.csv The command dir( fold, pattern = \.csv ) gives back *all* the 3 files With dir( fold, pattern = \\.csv ) I get back only VorlageTradefile.csv. I don't

Re: [R] dir() and RegEx and gsub()

2005-06-09 Thread Gabor Grothendieck
On 6/9/05, Hans-Peter [EMAIL PROTECTED] wrote: Dear R-Users, I have two questions: a) in a directory there are 3 files: [1] Data.~csvKopie von Data.~csv VorlageTradefile.csv The command dir( fold, pattern = \.csv ) gives back *all* the 3 files With dir( fold, pattern =