Re: [R] variable as part of file name

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Wed, 02 Jul 2008 10:41:21 -0300

Try this:

sprintf("%s.jpg", var_filename)

On Wed, Jul 2, 2008 at 10:31 AM, Laura Poggio <laura.poggio_at_gmail.com> 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")
>
> jpeg("var_filename.jpg")
> plot()
> dev.off()
>
> It would be very useful in order to avoid to change manually many strings.
> I
> guess it is possible, but I did not find a way.
> I am using R 2.7.0 on a window machine.
>
> Thank you very much in advance.
>
> Laura
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org 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.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]


______________________________________________ R-help_at_r-project.org 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 Wed 02 Jul 2008 - 13:45:24 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 - 14:31:05 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.

list of date sections of archive