[R] Package Building and Name Space
Hello, I just don't get this and would appreciate if someone could write a line or two: I'm trying to build this package and it stops installing after I add the following to the NAMESPACES file: >importFrom(gsubfn,strapply) The error during the package test is: Error in MyPackage::MyFunction : package 'MyPackage' has no name space and is not on the search path Calls: ... -> switch -> sys.source -> eval -> eval -> :: Execution halted 'MyFunction' contains 'strapply' from gsubfn. Please tell me where I err. Thanks, Joh __ R-help@r-project.org mailing list 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.
Re: [R] Package Building and Name Space
Hi Johannes, Apparently the package 'strapply' does not have the namespace, so you cannot use importFrom directive to import gsubfn() from it. In that case, I believe, you need to rely on the "old" mechanism using require(). Apart from that, it also seems that 'strapply' package is not even in the R search path. Do you see it in the listing created by a call to library()? HTH, Michal Johannes Graumann-2 wrote: > > Hello, > > I just don't get this and would appreciate if someone could write a line > or > two: I'm trying to build this package and it stops installing after I add > the following to the NAMESPACES file: > >>importFrom(gsubfn,strapply) > > The error during the package test is: > > Error in MyPackage::MyFunction : > package 'MyPackage' has no name space and is not on the search path > Calls: ... -> switch -> sys.source -> eval -> > eval -> :: > Execution halted > > 'MyFunction' contains 'strapply' from gsubfn. > > Please tell me where I err. > > Thanks, Joh > > __ > R-help@r-project.org mailing list > 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. > > - Michal Bojanowski ICS / Department of Sociology Utrecht University Heidelberglaan 2; 3584 CS Utrecht The Netherlands m.j.bojanowski at uu dot nl http://www.fss.uu.nl/soc/bojanowski/ http://bojan.3e.pl/ -- View this message in context: http://www.nabble.com/Package-Building-and-Name-Space-tp15038573p15045108.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list 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.
Re: [R] Package Building and Name Space
Hello, I don't think package gsubfn which is supposed to provide function 'strapply' is the culprit (just yet). The error message was that my own new package has no name space and isn't in the search path (the second is possibly easily explained by the fact that it's supposed to be installed after packaging it ;0). I'm taking this to the developer list, where it should have gone to begin with ... Thanks, Joh > > Hi Johannes, > > Apparently the package 'strapply' does not have the namespace, so you > cannot use importFrom directive to import gsubfn() from it. In that case, > I believe, you need to rely on the "old" mechanism using require(). Apart > from that, it also seems that 'strapply' package is not even in the R > search path. Do you see it in the listing created by a call to library()? > > HTH, > > Michal > > > Johannes Graumann-2 wrote: >> >> Hello, >> >> I just don't get this and would appreciate if someone could write a line >> or >> two: I'm trying to build this package and it stops installing after I add >> the following to the NAMESPACES file: >> >>>importFrom(gsubfn,strapply) >> >> The error during the package test is: >> >> Error in MyPackage::MyFunction : >> package 'MyPackage' has no name space and is not on the search path >> Calls: ... -> switch -> sys.source -> eval -> >> eval -> :: >> Execution halted >> >> 'MyFunction' contains 'strapply' from gsubfn. >> >> Please tell me where I err. >> >> Thanks, Joh >> >> __ >> R-help@r-project.org mailing list >> 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. >> >> > > > - > > Michal Bojanowski > ICS / Department of Sociology > Utrecht University > Heidelberglaan 2; 3584 CS Utrecht > The Netherlands > m.j.bojanowski at uu dot nl > http://www.fss.uu.nl/soc/bojanowski/ > http://bojan.3e.pl/ > __ R-help@r-project.org mailing list 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.