Hello, I wrote a package, which in the NAMESPACE file exports functions like this: exportPattern("^\\rh") On R-2.8 (Linux, 64), upon loading the package I have the rh functions present. On R-2.10, Mac OS X, (32 bit), it builds, loads, but the functions are not loaded, i.e the only function is rhyper (which is not from my package). Is there something wrong with my package setup? Regards Saptarshi
As a followup, i can do things Package:::rh*, there just no exported. On Tue, Dec 1, 2009 at 11:18 AM, Saptarshi Guha <saptarshi.guha at gmail.com> wrote:> Hello, > I wrote a package, which in the NAMESPACE file exports functions like this: > > exportPattern("^\\rh") > > On R-2.8 (Linux, 64), upon loading the package I have the rh functions present. > > On R-2.10, Mac OS X, (32 bit), it builds, loads, but the functions are not > loaded, i.e the only function is rhyper (which is not from my package). > > Is there something wrong with my package setup? > > Regards > Saptarshi >
Romain Francois
2009-Dec-01 16:28 UTC
[R] Package is loaded but functions are not exported
You probably just want : exportPattern("^rh") What did you expect the backslash to do ? On 12/01/2009 05:18 PM, Saptarshi Guha wrote:> > Hello, > I wrote a package, which in the NAMESPACE file exports functions like this: > > exportPattern("^\\rh") > > On R-2.8 (Linux, 64), upon loading the package I have the rh functions present. > > On R-2.10, Mac OS X, (32 bit), it builds, loads, but the functions are not > loaded, i.e the only function is rhyper (which is not from my package). > > Is there something wrong with my package setup? > > Regards > Saptarshi-- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/FtUu : new package : highlight |- http://tr.im/EAD5 : LondonR slides `- http://tr.im/BcPw : celebrating R commit #50000
On 01/12/2009 11:18 AM, Saptarshi Guha wrote:> Hello, > I wrote a package, which in the NAMESPACE file exports functions like this: > > exportPattern("^\\rh") >That's a very strange pattern to be using. Why do you want those backslashes there? If you just want to export items whose names start with "rh", you should use the pattern "^rh". Duncan Murdoch> On R-2.8 (Linux, 64), upon loading the package I have the rh functions present. > > On R-2.10, Mac OS X, (32 bit), it builds, loads, but the functions are not > loaded, i.e the only function is rhyper (which is not from my package). > > Is there something wrong with my package setup? > > Regards > Saptarshi > > ______________________________________________ > R-help at 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. >
I have no idea why I used the \\, the perils of copy and pasting from some other package or source . So, heres the thing, did R regex interpreter change? How come my export stopped working? Thank you Regards Saptarshi On Tue, Dec 1, 2009 at 11:28 AM, Romain Francois <romain.francois at dbmail.com> wrote:> You probably just want : exportPattern("^rh") > > What did you expect the backslash to do ? > > On 12/01/2009 05:18 PM, Saptarshi Guha wrote: >> >> Hello, >> I wrote a package, which in the NAMESPACE file exports functions like >> this: >> >> exportPattern("^\\rh") >> >> On R-2.8 (Linux, 64), upon loading the package I have the rh functions >> present. >> >> On R-2.10, Mac OS X, (32 bit), it builds, loads, but the functions are not >> loaded, i.e the only function is rhyper (which is not from my package). >> >> Is there something wrong with my package setup? >> >> Regards >> Saptarshi > > -- > Romain Francois > Professional R Enthusiast > +33(0) 6 28 91 30 30 > http://romainfrancois.blog.free.fr > |- http://tr.im/FtUu : new package : highlight > |- http://tr.im/EAD5 : LondonR slides > `- http://tr.im/BcPw : celebrating R commit #50000 > >