[R] How to use a reserved word in italics in an expression

Michael Kubovy kubovy at virginia.edu
Sat Feb 16 22:51:02 CET 2008


Dear R-helpers,

 > label2 <- expression(paste(italic(attraction function:), 'slope'))
Error: unexpected 'function' in "label2 <-  
expression(paste(italic(attraction function"

How do I tell R that in this case I don't want 'function' to be  
treated as a reserved word but as a string in italics?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/



More information about the R-help mailing list