Displaying 2 results from an estimated 2 matches for "inperson".
Did you mean:
idperson
2008 Dec 21
3
Globbing Files in R
Dear all,
For example I want to process set of files.
Typically Perl's idiom would be:
__BEGIN__
@files = glob("/mydir/*.txt");
foreach my $file (@files) {
# process the file
}
__END__
What's the R's way to do that?
- Gundala Viswanath
Jakarta - Indonesia
2008 Dec 29
0
Serial Correlation Test for Short Time Series
...g())
The dir function has path and pattern arguments to select the set of
files you want.
This works fine when there are no problems, but often I'll use a for
loop so problem files can be dealt with differently when necessary.
Perhaps something like this:
ProcessList <- dir(pattern="InPerson*")
for (i in 1:length(ProcessList))
{
filename <- ProcessList[i]
. . .
}
efg
Earl F Glynn
Overland Park, KS
------------------------------
Message: 22
Date: Mon, 22 Dec 2008 13:22:27 -0500
From: Duncan Murdoch <murdoch at stats.uwo.ca>
Subject: Re: [R] Globbing Files in...