Re: [R] formula wrangling

2020-09-21 Thread John Fox
Dear Roger, This is an interesting puzzle and I started to look at it when your second message arrived. I can simplify your code slightly in two places, here: if (exists("fqssnames")) { mff <- m ffqss <- paste(fqssnames, collapse = "+") mff$formula <-

Re: [R] formula wrangling

2020-09-21 Thread Koenker, Roger W
Here is a revised snippet that seems to work the way that was intended. Apologies to anyone who wasted time looking at the original post. Of course my interest in simpler or more efficient solutions remains unabated. if (exists("fqssnames")) { mff <- m mff$formula <- Terms

[R] formula wrangling

2020-09-21 Thread Koenker, Roger W
I need some help with a formula processing problem that arose from a seemingly innocuous request that I add a “subset” argument to the additive modeling function “rqss” in my quantreg package. I’ve tried to boil the relevant code down to something simpler as illustrated below. The formulae