Re: [R] opening files in directory

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon 04 Sep 2006 - 20:13:31 GMT

On 9/4/06, Mike Nielsen <mr.blacksheep@gmail.com> wrote:
> R won't do variable interpolation inside quotation marks as perl does.

Just as an aside, gsubfn in package gsubfn will do perl-style (well, sort of) string interpolation:

> library(gsubfn)
> i <- 1
> gsubfn(x = "data_files/file$i")

[1] "data_files/file1"

cati and cati0 in the same package provide for such interpolation within cat.



R-help@stat.math.ethz.ch 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. Received on Tue Sep 05 07:28:20 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 07 Sep 2006 - 07:51:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.