Very nice, thank you!
Sarah
On Thu, May 25, 2023 at 8:20 PM Iris Simmons wrote:
>
> Hi,
>
>
> I think there are two easy ways to fix this. The first is to use a `switch`
> to call the intended function, this should not be a problem since there are a
> small number of print functions in **mixR
I agree with Iris: the switch() solution looks like the best option
here. The only change I'd make is to pass the dots down to the print
function (or possibly warn about using them if those functions don't
support any other parameters).
Duncan Murdoch
On 25/05/2023 8:20 p.m., Iris Simmons w
Hi,
I think there are two easy ways to fix this. The first is to use a `switch`
to call the intended function, this should not be a problem since there are
a small number of print functions in **mixR**
```R
print.mixfitEM <- function (x, digits = getOption("digits"), ...)
{
switch(x$family,
Thank you to both Duncan and Ivan for the detailed answers. I'll point
the mixR maintainer at this thread in the list archive, because your
suggestions were so clear, and I can't explain them as thoroughly.
I'll keep using x as the argument name for now.
Much appreciated,
Sarah
On Thu, May 25, 2
(Sorry for the double post.)
В Thu, 25 May 2023 18:53:45 +0300
Ivan Krylov пишет:
> print(fit1) # tracer not called
Interesting. There must be some caching involved. If print(a) is
resolved to print.mixfitEM at least once, it keeps failing. In a fresh
R session, where a trace()-patch is done be
В Thu, 25 May 2023 10:18:13 -0400
Sarah Goslee пишет:
> print called on this object gets passed to print.mixfitEM(), which is:
>
>
> function (x, digits = getOption("digits"), ...)
> {
> family <- x$family
> mc <- match.call()
> mc$digits <- digits
> fun.name <- paste0("print",
On 25/05/2023 10:18 a.m., Sarah Goslee wrote:
Hi,
I ran into a problem with S3 method dispatch and scoping while trying
to use functions from the mixR package within my own functions. I know
enough to find the problem (I think!), but not enough to fix it
myself. The problem isn't really a packag
Hi,
I ran into a problem with S3 method dispatch and scoping while trying
to use functions from the mixR package within my own functions. I know
enough to find the problem (I think!), but not enough to fix it
myself. The problem isn't really a package-specific problem, so I'm
starting here, and wi
8 matches
Mail list logo