[R] bquote in list to be used with do.plot()
Duncan Murdoch
murdoch.duncan at gmail.com
Sat Oct 8 19:11:29 CEST 2016
On 08/10/2016 12:50 PM, Marc Girondot via R-help wrote:
> Dear members,
>
> Has someone have a solution to include a bquote() statement in a list to
> be used with do.call() ?
>
> Here is an exemple:
> scaleY <- 10000
> plot(x=1, y=1, ylab=bquote(.(format(scaleY), scientific=FALSE)^"-1"))
>
> Like that, it works.
>
> Now he same in a list:
> L <- list(x=1, y=1, ylab=bquote(.(format(scaleY),
> scientific=FALSE)^"-1"))
> do.call(plot, L)
> Error in "10000"^"-1" : argument non numérique pour un
> opérateur binaire
>
> It produces an error.
>
> Any solution?
>
> (I tries also with substitute() and expression() but I fail also)
This seems to work:
L <- list(x=1, y=1, ylab=bquote(expression(.(format(scaleY),
scientific=FALSE)^"-1")))
do.call(plot, L)
Duncan Murdoch
More information about the R-help
mailing list