[R] excluding on element from a list

Daisy Englert Duursma daisy.duursma at gmail.com
Mon May 24 09:40:59 CEST 2010


Dear List,

I am making a list of all the files in a folder and I want to exclude
one file called "proj.current".  This is the 31st file in a folder.
Currently I use the command:

tdirs <- list.files(pattern="proj.")[-31]

However I would like to exclude it based on its name and not the position.

Any advice would be useful.

Thanks,
Daisy



Daisy Englert Duursma

Room E8C156
Dept. Biological Sciences
Macquarie University  NSW  2109
Australia



More information about the R-help mailing list