I'm trying to format a given character vector as an expression with Greek symbols to be used in labeling axis ticks. Thanks to some help from David Winsemius, I've learned how to make the substitution and place the Greek symbols in, however I've run into another problem: Some of my labels have commas in them, so when the parse command is executed, there is an unexpected symbol error. For example:
> x <- c("aa", "aaa,aa", "bb*Delta*b", "cccc*Delta*cc,c") > parse(text = x) Error in parse(text = x) : <text>:2:4: unexpected ',' 1: aa 2: aaa, ^ I've tried various iterations of wrapping the commas in interior quotes ("aaa\",\"aa"), but then the error shifts to the quote. I see in plotmath that 'list(a,b,c)' gives me comma separated values, but I haven't been able to work out how to get this construction for elements that have a comma. Is this possible? -- Eric Archer, Ph.D. Southwest Fisheries Science Center NMFS, NOAA 8901 La Jolla Shores Drive La Jolla, CA 92037 USA 858-546-7121 (work) 858-546-7003 (FAX) Marine Mammal Genetics Group: swfsc.noaa.gov/prd-mmgenetics ETP Cetacean Assessment Program: swfsc.noaa.gov/prd-etp "The universe doesn't care what you believe. The wonderful thing about science is that it doesn't ask for your faith, it just asks for your eyes." - Randall Munroe "Lighthouses are more helpful than churches." - Benjamin Franklin "...but I'll take a GPS over either one." - John C. "Craig" George [[alternative HTML version deleted]] ______________________________________________ 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.