On 05/02/2010 11:56 AM, 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.
Hi Rachel, I think what you are looking for is the somewhat obscure: deparse(substitute(x)) that returns the name of a variable as a character string. Jim ______________________________________________ R-help@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.