Hoi Marcelo,

--On donderdag 29 januari 2004 11:33 -0300 Marcelo Luiz de Laia <[EMAIL PROTECTED]> wrote:

files <- dir(pattern="*.sens")


but it includes all of the files that have "sens", independent of they be
in the end or in the middle of the name of the file.

That's because your pattern is a regular expression and not a Windows/DOS wildcard. You'll need something like

files <- dir(pattern="\.sens$")

\. matches the dot itself (without the slash it's a wildcard for any character) and the dollar sign $ matches the end of the filename. So this way you'll get every file that has 'sens' as its extension


regards, Paul




-- Paul Lemmens NICI, University of Nijmegen ASCII Ribbon Campaign /"\ Montessorilaan 3 (B.01.03) Against HTML Mail \ / NL-6525 HR Nijmegen X The Netherlands / \ Phonenumber +31-24-3612648 Fax +31-24-3616066

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to