Re: [R] get a vector with filenames with a certain extension in a folder

2009-07-18 Thread torpedo fisken
Thanks 'dir()' with glob2rx does what I want. Thanks again 2009/7/17 Peter Dalgaard : > milton ruser wrote: >> >> Hi there, >> >> try this: >> >> setwd("/home/mcr") >> dir(path=".", pattern=".txt$") >> >> OR >> >> dir(path="/home/mcr/.", pattern=".txt$") >> >> $ means finished with ".txt" > > A w

Re: [R] get a vector with filenames with a certain extension in a folder

2009-07-16 Thread Peter Dalgaard
milton ruser wrote: Hi there, try this: setwd("/home/mcr") dir(path=".", pattern=".txt$") OR dir(path="/home/mcr/.", pattern=".txt$") $ means finished with ".txt" A word of warning. The pattern is a regular expression, so the above means that the name ends with an arbitrary character foll

Re: [R] get a vector with filenames with a certain extension in a folder

2009-07-16 Thread milton ruser
Hi there, try this: setwd("/home/mcr") dir(path=".", pattern=".txt$") OR dir(path="/home/mcr/.", pattern=".txt$") $ means finished with ".txt" good luck, milton brazil=toronto On Fri, Jul 17, 2009 at 12:08 AM, torpedo fisken wrote: > Hi > I got a script that works on file with the extensio

[R] get a vector with filenames with a certain extension in a folder

2009-07-16 Thread torpedo fisken
Hi I got a script that works on file with the extension ".qed" that are al located in a folder '~/works/' Is there are R function that will fetch all the filenames from the works subdir, similar to 'ls ~/works/*.qed' Thanks in advance __ R-help@r-proj