Re: [R] function closure

2013-08-12 Thread Ashwani Rao
gt; > dir(pattern="\\.xml$") > > [1] "two.xml" > > ** ** > > You a probably thinking of 'glob' patterns, akin to what is used > > in DOS and Unix shells. You can use glob2rx to convert them to**** > > regular expressions.

Re: [R] function closure

2013-08-12 Thread Ashwani Rao
, 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---

[R] function closure

2013-08-12 Thread Ashwani Rao
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") {

[R] tm (text mining) package persistent storage

2013-07-29 Thread Ashwani Rao
Hi, My Corpus is bunch of xml files in a single directory. Each xml files have bunch of documents. I can create a persitent storage using PCorpus constructor by specifying a DIrectorySource. PCorpus writes this as key-value data base. My problem is that next time when I want to start R then I wan