[R] Expression evaluation of Plotting labels containing spaces

Pascal Oettli kridox at ymail.com
Wed Jun 5 06:08:48 CEST 2013


Hi,

On possibility is:

par(mfrow=c(2,1), mar=c(5.1,5.1,4.1,2.1))
plot(1,1, ylab=expression(a.s.b.~(m^2)))
plot(1,1, ylab=expression(abs~surf~body~(m^2)))

Regards,
Pascal

On 05/06/13 11:39, Santosh wrote:
> Dear Rxperts,
> How do I overcome the anomaly as in the second case of examples below?
>
> exc <- list(units=list( c(m^2)) ,vars= list(c('asb')), ,label= list(c('abs
> surf body')))
>
> plot(1:10,1:10, ylab=parse(text= paste(exc$vars[1],'
> (',exc$units[1],')',sep='')))
>
> plot(1:10,1:10, ylab=parse(text= paste(exc$label[1],'
> (',exc$units[1],')',sep='')))
>
> Thanks so much!
>
> Santosh
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list