Re: [R] plotmath and logical operators?

2018-08-21 Thread Gabor Grothendieck
Try this: plot(1) tmp <- x >= 3 ~ "&" ~ y <= 3 mtext(tmp) On Mon, Aug 20, 2018 at 5:00 PM MacQueen, Don via R-help wrote: > > I would like to use plotmath to annotate a plot with an expression that > includes a logical operator. > > ## works well > tmp <- expression(x >= 3) > plot(1) >

Re: [R] plotmath and logical operators?

2018-08-20 Thread Richard M. Heiberger
proach to set up a system that helps me to interactively >> review various subsets of a large set of data. I save the final selected >> subsetting expressions in some sort of data structure, for later use in >> preparing a report using rmarkdown. >> >> I was hoping to use p

Re: [R] plotmath and logical operators?

2018-08-20 Thread William Dunlap via R-help
ueen > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > Lab cell 925-724-7509 > > > > From: Bert Gunter > Date: Monday, August 20, 2018 at 3:38 PM > To: "MacQueen, Don" > Cc: array R-help > Subject

Re: [R] plotmath and logical operators?

2018-08-20 Thread Bert Gunter
> 925-423-1062 > > Lab cell 925-724-7509 > > > > > > > > *From: *Bert Gunter > *Date: *Monday, August 20, 2018 at 3:38 PM > *To: *"MacQueen, Don" > *Cc: *array R-help > *Subject: *Re: [R] plotmath and logical operators? > > >

Re: [R] plotmath and logical operators?

2018-08-20 Thread MacQueen, Don via R-help
cell 925-724-7509 From: Bert Gunter Date: Monday, August 20, 2018 at 3:38 PM To: "MacQueen, Don" Cc: array R-help Subject: Re: [R] plotmath and logical operators? This is clumsy and probably subject to considerable improvement, but does it work for you: left <- quote(x >= 3)

Re: [R] plotmath and logical operators?

2018-08-20 Thread Bert Gunter
This is clumsy and probably subject to considerable improvement, but does it work for you: left <- quote(x >= 3) right <- quote(y <= 3) ## these can be anything ## the plot: plot(1) eval(substitute(mtext(expression(paste(left, " & ",right))), list(left = left, right = right))) ## Expression

[R] plotmath and logical operators?

2018-08-20 Thread MacQueen, Don via R-help
I would like to use plotmath to annotate a plot with an expression that includes a logical operator. ## works well tmp <- expression(x >= 3) plot(1) mtext(tmp) ## not so well tmp <- expression(x >= 3 & y <= 3) plot(1) mtext(tmp) Although the text that's displayed makes sense, it won't be