[R] Text dependent on a variable in a R function

Nikhil Kaza nikhil.list at gmail.com
Sun May 2 16:10:47 CEST 2010


say x is the variable.

plot(..., title=paste(x, "whatever else"), ...) should work as well.

same should work with file names as well.

Nikhil



On May 1, 2010, at 9:56 PM, R K wrote:

>
> Hello,
>
> I was wondering if someone could tell me how I can make text  
> dependent on a variable in a R function I have created.
>
> The function will create plots, thus I would like each plot to have  
> a unique title based on the inputted variable as well as a unique  
> file name when saved using the savePlot function.
>
> Thanks!
> Rachel
> 		 	   		
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your  
> inbox.
>
> N:WL:en-US:WM_HMP:042010_3
> 	[[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.



More information about the R-help mailing list