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 <lists at dewey.myzen.co.uk> 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]] >> ______________________________________________ >> R-help at r-project.org 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 > > ______________________________________________ > R-help at r-project.org 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: pd.mes at cbs.dk Priv: PDalgd at gmail.com
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 <pdalgd at gmail.com>
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 <lists at
dewey.myzen.co.uk> 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]]
> >> ______________________________________________
> >> R-help at r-project.org 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
> >
> > ______________________________________________
> > R-help at r-project.org 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: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>
>
>
>
>
>
>
>
>
>
[[alternative HTML version deleted]]
> On Oct 5, 2017, at 12:28 AM, Ole H?st <olehost at gmail.com> 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 <pdalgd at gmail.com> 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 <lists at dewey.myzen.co.uk> 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]] >>>> ______________________________________________ >>>> R-help at r-project.org 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 >>> >>> ______________________________________________ >>> R-help at r-project.org 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: pd.mes at cbs.dk Priv: PDalgd at gmail.com >> >> >> >> >> >> >> >> >> >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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