Re: [R-pkg-devel] import with except(ion)

2020-11-02 Thread Göran Broström
Just a final observation: This can happen to anybody - > lm(weight ~ feed, data = chickwts) Call: lm(formula = weight ~ feed, data = chickwts) Coefficients: (Intercept) feedhorsebeanfeedlinseed feedmeatmeal feedsoybean feedsunflower

Re: [R-pkg-devel] import with except(ion)

2020-11-02 Thread Göran Broström
Thanks! Göran On 2020-11-02 11:09, Sebastian Meyer wrote: No need to reinvent the wheel. Göran, you already use the "specials" feature of terms.formula to find strata(): specials: which functions in the formula should be marked as special in the 'terms' object? A character vector

Re: [R-pkg-devel] import with except(ion)

2020-11-02 Thread Sebastian Meyer
No need to reinvent the wheel. Göran, you already use the "specials" feature of terms.formula to find strata(): > specials: which functions in the formula should be marked as special in > the 'terms' object? A character vector or 'NULL'. I think you can do the same for frailty(), for e

Re: [R-pkg-devel] import with except(ion)

2020-10-31 Thread Göran Broström
On 2020-10-31 14:30, Gabor Grothendieck wrote: coxreg could search for frailty and issue a warning or error if found. This returns TRUE if frailty is used in the formula argument as a function but not otherwise. That would allow implementation of a nicer message than if it were just reported

Re: [R-pkg-devel] import with except(ion)

2020-10-31 Thread Gabor Grothendieck
coxreg could search for frailty and issue a warning or error if found. This returns TRUE if frailty is used in the formula argument as a function but not otherwise. That would allow implementation of a nicer message than if it were just reported as a missing function. find_frailty <- function(e)

Re: [R-pkg-devel] import with except(ion)

2020-10-31 Thread Göran Broström
On 2020-10-31 13:49, Duncan Murdoch wrote: On 30/10/2020 2:45 p.m., Göran Broström wrote: My CRAN package eha depends on the survival package, and that creates problems with innocent users: It is about the 'frailty' function (mainly). While (after 'library(eha)') f1 <- coxph(Surv(time, statu

Re: [R-pkg-devel] import with except(ion)

2020-10-31 Thread Duncan Murdoch
On 30/10/2020 2:45 p.m., Göran Broström wrote: My CRAN package eha depends on the survival package, and that creates problems with innocent users: It is about the 'frailty' function (mainly). While (after 'library(eha)') f1 <- coxph(Surv(time, status) ~ age + frailty(inst), data = lung) produce

Re: [R-pkg-devel] import with except(ion)

2020-10-31 Thread Göran Broström
On 2020-10-31 12:09, Göran Broström wrote: I think I finally got it: I must involve the export business after importing, thus, in NAMESPACE: importFrom(survival,Surv) export(Surv) That's all, Not really: * checking for missing documentation entries ... WARNING Undocumented code objects:

Re: [R-pkg-devel] import with except(ion)

2020-10-31 Thread Göran Broström
I think I finally got it: I must involve the export business after importing, thus, in NAMESPACE: importFrom(survival,Surv) export(Surv) That's all, G, On 2020-10-30 19:45, Göran Broström wrote: My CRAN package eha depends on the survival package, and that creates problems with innocent user

[R-pkg-devel] import with except(ion)

2020-10-30 Thread Göran Broström
My CRAN package eha depends on the survival package, and that creates problems with innocent users: It is about the 'frailty' function (mainly). While (after 'library(eha)') f1 <- coxph(Surv(time, status) ~ age + frailty(inst), data = lung) produces what you would expect (a frailty survival an