Re: [R] Pass an equation as an argument of a sub-function

2019-06-06 Thread Bert Gunter
It is perhaps worth saying that my prior suggestion may not be the best strategy for doing what you want. The previous poster needed the actual expression to deparse as a label. If you only need the expression as a function to be evaluated, it may be better to pass the argument as a function -- a f

Re: [R] Pass an equation as an argument of a sub-function

2019-06-06 Thread Bert Gunter
See here for almost the same issue: http://r.789695.n4.nabble.com/Pasting-R-code-lines-into-labels-td4757446.html Same answer: pass the unevaluated formula (i.e. an R expression) using substitute/quote. Then evaluate it appropriately using eval. Same references. Bert Gunter "The trouble with ha