[Rd] specials issue, a heads up
robin hankin
h@nk|n@rob|n @end|ng |rom gm@||@com
Mon Feb 24 20:54:04 CET 2020
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 say---distinct
idiom which is easy to misunderstand. My suggestion would be to document
the misunderstanding. Add the survival::coxph() expression you quote above
to coxph.Rd, maybe under a \warning{} section, explaining both a
reasonable but wrong, and the correct way, to parse such constructions.
Best wishes
Robin
On Tue, Feb 25, 2020 at 2:56 AM Therneau, Terry M., Ph.D. via R-devel <
r-devel using r-project.org> 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 +
> survival::strata(inst),
> data=lung)
>
> a. The Google R style guide recommends that one put :: everywhere
> b. This breaks the recognition of cluster as a "special" in the terms
> function.
>
> I've been stubborn and said that their misunderstanding of how formulas
> work is not my
> problem. But I'm sure that the issue will come up again, and multiple
> other packages
> will break.
>
> A big problem is that the code runs, it just gives the wrong answer.
>
> Suggestions?
>
> Terry T.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
[[alternative HTML version deleted]]
More information about the R-devel
mailing list