[R] variable as part of file name

2008-07-02 Thread Laura Poggio
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 = as.name(aaa) jpeg(var_filename.jpg) plot() dev.off() It would be very useful in

Re: [R] variable as part of file name

2008-07-02 Thread Henrique Dallazuanna
Try this: sprintf(%s.jpg, var_filename) On Wed, Jul 2, 2008 at 10:31 AM, Laura Poggio [EMAIL PROTECTED] 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

Re: [R] variable as part of file name

2008-07-02 Thread Laura Poggio
Thank you perfect! it worked also with the GDAL option. Laura 2008/7/2 Richard Pearson [EMAIL PROTECTED]: Laura Does jpeg(paste(var_filename, jpg, sep=.)) do what you want? Regards Richard Laura Poggio wrote: Dear all, sorry for this very basic question, but I did not find any good

Re: [R] variable as part of file name

2008-07-02 Thread Hans-Jörg Bibiko
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 = as.name(aaa)