[R] Superscript

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Wed Apr 3 17:31:53 CEST 2013


gsub searches strings, not expressions.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Shane Carey <careyshan at gmail.com> wrote:

>Hi,
>How do I write a superscript within gsub?
>
>I have the following: gsub("_mgkg",expression(paste("mg
>kg"^{-1})),names[1])
>
>Thanks



More information about the R-help mailing list