On Sep 18, 2011, at 10:47 AM, Dennis Fisher wrote:
R 2.13.1
OS X
Colleagues
I frequently encounter a situation in which I want to remove a
single element of an array. For example, if I am reading in a bunch
of CSV files, I create the list of files to be read with:
LIST <- dir()
However, sometimes I want to exclude one or more files. I can
accomplish this with a second command:
LIST <- LIST[LIST != "filename.to.be.excluded"]
This is cumbersome -- is there some more efficient code to
accomplish this?
Doesn't negative indexing provide this?
?Extract
--
David Winsemius, MD
West Hartford, CT
______________________________________________
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.