>
> > glob2rx("*.xml")
>
> [1] "^.*\\.xml$"
>
> ** **
>
> Bill Dunlap****
>
> Spotfire, TIBCO Software
>
> wdunlap tibco.com
>
> ** **
>
> *From:* Ashwani Rao [mailto:ashwamegh1...@gmail.com]
> *Sen
to
regular expressions.
> glob2rx("*.xml")
[1] "^.*\\.xml$"
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
From: Ashwani Rao [mailto:ashwamegh1...@gmail.com]
Sent: Monday, August 12, 2013 10:04 AM
To: William Dunlap
Cc: r-help@r-project.org
Subject: Re: [R] functio
Try changing the assignment to use "<<-"
fileindex <<- fileindex + 1
On Mon, Aug 12, 2013 at 12:44 PM, Ashwani Rao wrote:
> Hi,
>
> Just for fun, I wanted to try function closures.
> Here is simple function definition.
> The following "generateFiles" function return function "fileGen"
, pattern="\\.R$")
> > nextFile()
> [1] 1
> [1] "c:/temp/4209/test.R"
> > nextFile()
> [1] 2
> [1] "c:/temp/a.R"
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
>
> > -Original Message---
1
[1] "c:/temp/4209/test.R"
> nextFile()
[1] 2
[1] "c:/temp/a.R"
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Ashwani Ra
Hi,
Just for fun, I wanted to try function closures.
Here is simple function definition.
The following "generateFiles" function return function "fileGen" which will
return a a regular file in directory , every time a call it (fileGen).
generateFiles <- function(path, pattern="*.xml")
{
6 matches
Mail list logo