Dear R-Helpers, I am using the (great) tables package in a function this way:
parplot <- function (x){ test <- pkqps[pkqps$estimate == x,] #### #some plotting ##### tab <- tabular((Heading("Analyte")*(analyte) * Heading(Site)* (fsite)) ~ (n=1)+ Justify(c)*Heading(substitute(test$estimate[1])) *(result)*(Mean + Median + Min + Max + CV) * Format(digits = 1), data = test) html(tab, file = paste(qpar$param[1],"stat",".html", sep="")) } parplot("Cmax") parplot("AUClast") etc... I am trying to parametrize the heading in tabular with "Heading(substitute(test$estimate[1]))". test$estimate[1] is a character variate which is the name I want to appear in the heading (ie Cmax for example in the first call of the function. This does not work and produces just "substitute(test$estimate[1])" in the heading. I Have also tried quote() without success. Any advice on how to do this will be much appreciated, Best wishes, JL ______________________________________________ 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.