Re: [R] opening files in directory

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

On 9/4/06, Mike Nielsen <> 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. mailing list PLEASE do read the posting guide 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 Please read the posting guide before posting to the list.