Issue calling MICE package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue calling MICE package

Ole Høst
I want to call the mice function from the MICE package from my own package.
However I run into this issue, which can be reproduced on the command line:

mice::mice(airquality)#> Error in check.method(setup, data): The
following functions were not found: mice.impute.pmm, mice.impute.pmm

I have no problems when doing

library(mice)
mice(airquality)

Is this a bug or am I missing something?

Thanks,
Ole Høst

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Issue calling MICE package

Michael Dewey-3
Dear Ole

One of the experts may be able to diagnose this without extra
information but I suspect you have not got the right magic in your
NAMESPACE file in your package. You may need to re-read section 1.5.1 of
the Writing R extensions manual.

Michael

On 04/10/2017 13:47, Ole Høst wrote:

> I want to call the mice function from the MICE package from my own package.
> However I run into this issue, which can be reproduced on the command line:
>
> mice::mice(airquality)#> Error in check.method(setup, data): The
> following functions were not found: mice.impute.pmm, mice.impute.pmm
>
> I have no problems when doing
>
> library(mice)
> mice(airquality)
>
> Is this a bug or am I missing something?
>
> Thanks,
> Ole Høst
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>

--
Michael
http://www.dewey.myzen.co.uk/home.html

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Issue calling MICE package

Peter Dalgaard-2
IIUC, this would be an isssue with MICE (or rather "mice"), which isn't Ole's. It could be a namespace issue, but it could also be that some start-up code is not executed if library() is bypasses (see .onAttach et al.).

-pd

> On 4 Oct 2017, at 17:00 , Michael Dewey <[hidden email]> wrote:
>
> Dear Ole
>
> One of the experts may be able to diagnose this without extra information but I suspect you have not got the right magic in your NAMESPACE file in your package. You may need to re-read section 1.5.1 of the Writing R extensions manual.
>
> Michael
>
> On 04/10/2017 13:47, Ole Høst wrote:
>> I want to call the mice function from the MICE package from my own package.
>> However I run into this issue, which can be reproduced on the command line:
>> mice::mice(airquality)#> Error in check.method(setup, data): The
>> following functions were not found: mice.impute.pmm, mice.impute.pmm
>> I have no problems when doing
>> library(mice)
>> mice(airquality)
>> Is this a bug or am I missing something?
>> Thanks,
>> Ole Høst
>> [[alternative HTML version deleted]]
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>> ---
>> This email has been checked for viruses by AVG.
>> http://www.avg.com
>
> --
> Michael
> http://www.dewey.myzen.co.uk/home.html
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Issue calling MICE package

Ole Høst
Sorry, I was not clear enough. The reason I want to use mice::mice() rather
than library(mice); mice() is that I want to call it from my own package.
But the reprex works from the command line as well, straight after
launching R:

  mice::mice(airquality)
  #> Error in check.method(setup, data): The following functions were not
found: mice.impute.pmm, mice.impute.pmm

The mice.impute functions are exported from the mice package but not
found.I cannot figure out why but I was hoping someone else had come across
the issue.

Interestingly, I can circumvent the problem by doing
  foreach(i = ...) %dopar% {mice::mice()}

Thanks for your help,
Ole



On Wed, Oct 4, 2017 at 7:16 PM, Peter Dalgaard <[hidden email]> wrote:

> IIUC, this would be an isssue with MICE (or rather "mice"), which isn't
> Ole's. It could be a namespace issue, but it could also be that some
> start-up code is not executed if library() is bypasses (see .onAttach et
> al.).
>
> -pd
>
> > On 4 Oct 2017, at 17:00 , Michael Dewey <[hidden email]> wrote:
> >
> > Dear Ole
> >
> > One of the experts may be able to diagnose this without extra
> information but I suspect you have not got the right magic in your
> NAMESPACE file in your package. You may need to re-read section 1.5.1 of
> the Writing R extensions manual.
> >
> > Michael
> >
> > On 04/10/2017 13:47, Ole Høst wrote:
> >> I want to call the mice function from the MICE package from my own
> package.
> >> However I run into this issue, which can be reproduced on the command
> line:
> >> mice::mice(airquality)#> Error in check.method(setup, data): The
> >> following functions were not found: mice.impute.pmm, mice.impute.pmm
> >> I have no problems when doing
> >> library(mice)
> >> mice(airquality)
> >> Is this a bug or am I missing something?
> >> Thanks,
> >> Ole Høst
> >>      [[alternative HTML version deleted]]
> >> ______________________________________________
> >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >> ---
> >> This email has been checked for viruses by AVG.
> >> http://www.avg.com
> >
> > --
> > Michael
> > http://www.dewey.myzen.co.uk/home.html
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: [hidden email]  Priv: [hidden email]
>
>
>
>
>
>
>
>
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Issue calling MICE package

David Winsemius

> On Oct 5, 2017, at 12:28 AM, Ole Høst <[hidden email]> wrote:
>
> Sorry, I was not clear enough. The reason I want to use mice::mice() rather
> than library(mice); mice() is that I want to call it from my own package.
> But the reprex works from the command line as well, straight after
> launching R:
>
>  mice::mice(airquality)
>  #> Error in check.method(setup, data): The following functions were not
> found: mice.impute.pmm, mice.impute.pmm
>

You were (twice) advised to review what was in your NAMESPACE file. If you want further informed advice you may need to shear that document.

--
David.


> The mice.impute functions are exported from the mice package but not
> found.I cannot figure out why but I was hoping someone else had come across
> the issue.
>
> Interestingly, I can circumvent the problem by doing
>  foreach(i = ...) %dopar% {mice::mice()}
>
> Thanks for your help,
> Ole
>
>
>
> On Wed, Oct 4, 2017 at 7:16 PM, Peter Dalgaard <[hidden email]> wrote:
>
>> IIUC, this would be an isssue with MICE (or rather "mice"), which isn't
>> Ole's. It could be a namespace issue, but it could also be that some
>> start-up code is not executed if library() is bypasses (see .onAttach et
>> al.).
>>
>> -pd
>>
>>> On 4 Oct 2017, at 17:00 , Michael Dewey <[hidden email]> wrote:
>>>
>>> Dear Ole
>>>
>>> One of the experts may be able to diagnose this without extra
>> information but I suspect you have not got the right magic in your
>> NAMESPACE file in your package. You may need to re-read section 1.5.1 of
>> the Writing R extensions manual.
>>>
>>> Michael
>>>
>>> On 04/10/2017 13:47, Ole Høst wrote:
>>>> I want to call the mice function from the MICE package from my own
>> package.
>>>> However I run into this issue, which can be reproduced on the command
>> line:
>>>> mice::mice(airquality)#> Error in check.method(setup, data): The
>>>> following functions were not found: mice.impute.pmm, mice.impute.pmm
>>>> I have no problems when doing
>>>> library(mice)
>>>> mice(airquality)
>>>> Is this a bug or am I missing something?
>>>> Thanks,
>>>> Ole Høst
>>>>     [[alternative HTML version deleted]]
>>>> ______________________________________________
>>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>> ---
>>>> This email has been checked for viruses by AVG.
>>>> http://www.avg.com
>>>
>>> --
>>> Michael
>>> http://www.dewey.myzen.co.uk/home.html
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>
>> --
>> Peter Dalgaard, Professor,
>> Center for Statistics, Copenhagen Business School
>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Office: A 4.23
>> Email: [hidden email]  Priv: [hidden email]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.