Re: [Rd] specials issue, a heads up

2020-02-24 Thread Therneau, Terry M., Ph.D. via R-devel
Thanks to all who commented.   In some defense of the person who reported the "bug", it appeared to be a company policy from above, influenced by the fact that they had been often burned by not using :: when multiple packages use the same symbol. Some further technical detail:  coxph has 3

Re: [Rd] specials issue, a heads up

2020-02-24 Thread peter dalgaard
For some reason, I can't read this without thinking of the tech support guy going "No, it is http:// ... aitch - tee - tee - pee - colon - AS IN WHERE YOUR HEAD IS - slash - slash ..." -pd > On 24 Feb 2020, at 18:26 , Ben Bolker wrote: > > In the long run, coming up with a way to parse

Re: [Rd] specials issue, a heads up

2020-02-24 Thread robin hankin
Terry, speaking as a package author I would say that the package is the primary unit of organisation of R functionality, and package considerations should trump R style considerations. Packages should be self-contained as far as possible. Having said that, many of my own packages use---shall we

Re: [Rd] specials issue, a heads up

2020-02-24 Thread peter dalgaard
Notice that the stats package contains the same issue: For some reason it defines an offset() function (for no particular reason, afaics) which just returns its argument. So > x <- rnorm(10) > y <- z <- 1:10 > lm(x~y+offset(z)) Call: lm(formula = x ~ y + offset(z)) Coefficients: (Intercept)

Re: [Rd] specials issue, a heads up

2020-02-24 Thread Duncan Murdoch
On 24/02/2020 8:55 a.m., Therneau, Terry M., Ph.D. via R-devel wrote: I recently had a long argument wrt the survival package, namely that the following code didn't do what they expected, and so they reported it as a bug   survival::coxph( survival::Surv(time, status) ~ age + sex +

Re: [Rd] specials issue, a heads up

2020-02-24 Thread Ben Bolker
In the long run, coming up with a way to parse specials in formulas that is both clean and robust is a good idea - annoying users are a little bit like CRAN maintainers in this respect. I think I would probably do this by testing identical(eval(extracted_head), survival::Surv) - but this has lots

Re: [Rd] specials issue, a heads up

2020-02-24 Thread Hugh Parsonage
I mean if the person filing the bug regards style as more important than the truth of how R treats formulas then they’re literally talking in another language. I strongly recommend you do nothing or at most make a note in the documentation addressing this. Your time is too valuable. On Tue, 25

[Rd] specials issue, a heads up

2020-02-24 Thread Therneau, Terry M., Ph.D. via R-devel
I recently had a long argument wrt the survival package, namely that the following code didn't do what they expected, and so they reported it as a bug   survival::coxph( survival::Surv(time, status) ~ age + sex + survival::strata(inst), data=lung) a. The Google R style guide  recommends