Plus and minus sign in label/title

1,283 views
Skip to first unread message

Jean-Louis

unread,
Dec 3, 2011, 10:48:41 AM12/3/11
to ggp...@googlegroups.com
Good day to all,

When running the following toy script:

df <- data.frame(x = 1, y = 1)
ggplot(df, aes(x, y)) + geom_point() +
opts(title = expression(paste("ALSFRS (",Mean%+-%SEM,") by dose Group (mg)")))

ggplot(df, aes(x, y)) + geom_point() +
opts(title = expression(paste("ALSFRS (",Mean%+-%2SEM,") by dose Group (mg)")))

the first call works but I get an error with the second

 Erreur : symbole inattendu(e) dans :
"ggplot(df, aes(x, y)) + geom_point() +
opts(title = expression(paste("ALSFRS (",Mean%+-%2SEM"

I am just trying to get "mean symbolofplusandminus 2 SEM" in my title.

Any help greatly appreciated.

Best wishes, JL

Dennis Murphy

unread,
Dec 3, 2011, 11:51:54 AM12/3/11
to ggp...@googlegroups.com
Hi:

Here's one way you could do it:

ggplot(df, aes(x, y)) + geom_point() +

opts(title = expression(paste("ALSFRS (Mean" %+-% "2SEM) by dose
Group (mg)")))


Dennis

> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2

Reply all
Reply to author
Forward
0 new messages