Re: [R] variable as part of file name

From: Hans-Jörg Bibiko <>
Date: Wed, 02 Jul 2008 16:22:03 +0200

On 02.07.2008, at 15:31, Laura Poggio wrote:

> Dear all,
> sorry for this very basic question, but I did not find any good
> example yet.
> I would like to set up a variable that can be recall later to
> substitute a
> part of a file name.
> As example:
> var_filename ="aaa")
> jpeg("var_filename.jpg")
> plot()

var_filename <- 'foo'
jpeg( paste( var_filename, '.jpg', sep='' ) )

See ?paste

--Hans mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 02 Jul 2008 - 15:00:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jul 2008 - 16:30:57 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive