epinowcast / primarycensored

Primary event censored distributions in R and Stan.
https://primarycensored.epinowcast.org/
Other
7 stars 1 forks source link

Investigate alternatives to global environment assignment in fitdistdoublecens #62

Closed seabbs closed 1 week ago

seabbs commented 1 month ago

As the title and as flagged in #61. There are two options I see:

I think the current implementation is not CRAN compliant and so I think this needs to be resolved before CRAN submission.

seabbs commented 1 month ago

Perhaps just using withr would be enough.

seabbs commented 3 weeks ago

I tried with withr::with_environment and that didn't seem to work.

seabbs commented 3 weeks ago

Submit a issue/PR to fitdistrplus to change the way that it (optionally) finds custom distribution functions.

I'm currently favouring this I think

seabbs commented 1 week ago

@Bisaloo any chance you have any good ideas here? I think this is blocking a CRAN release but its also really useful functionality for people who can't/don't want to use CRAN.

seabbs commented 1 week ago

This is the assignment I can't find a way around

seabbs commented 1 week ago

Issue over on fitdistrplus: https://github.com/lbbe-software/fitdistrplus/issues/33

seabbs commented 1 week ago

The problematic line is here: https://github.com/lbbe-software/fitdistrplus/blob/89f00a69b35bc687f6003355354b8ec712b31c74/R/fitdist.R#L34