rusers.sh
2010-Jan-06 01:18 UTC
[R] Anybody can suggest a better method to build a package while ignoring some functions
Hi, Say i have three functions in a new package, a,b and c. I only want the one function "a" to be exported for use. "b" and "c" are not very stable. If i specify to export all the three functions in the NAMESPACE file (export(a,b,c)), no errors appeared after checking the package. And i am sure there should be no errors. But if i only export the one function "a" by specifying it in the NAMESPACE file(export(a)), one error appeared. See below. #### Error ### * checking examples ... ERROR Running examples in 's-Ex.R' failed. The error most likely occurred in:> ### * b > > flush(stderr()); flush(stdout()) > > ### Name: b > ### Title: Compute inverse cosine with angle given in degrees > ### Aliases: ab > ### Keywords: array > > ### ** Examples > b(theta=30)Error: could not find function "acos_d" Execution halted Anybody knows where the problem is and how to solve this? Is there better method to obtain what i want? Thanks -- ----------------- Jane Chang Queen's [[alternative HTML version deleted]]
Michael Dewey
2010-Jan-08 14:04 UTC
[R] Anybody can suggest a better method to build a package while ignoring some functions
At 01:18 06/01/2010, rusers.sh wrote:>Hi, > Say i have three functions in a new package, a,b and c. I only want the one >function "a" to be exported for use. "b" and "c" are not very stable. > If i specify to export all the three functions in the NAMESPACE file >(export(a,b,c)), no errors appeared after checking the package. And i am >sure there should be no errors. > But if i only export the one function "a" by specifying it in the >NAMESPACE file(export(a)), one error appeared.Without seeing the text of the functions it is hard to offer advice. Try to remove as much as possible from each function until you have a minimal reproducible example (as the posting guide asks you).> See below. >#### Error ### >* checking examples ... ERROR >Running examples in 's-Ex.R' failed. >The error most likely occurred in: > > ### * b > > > > flush(stderr()); flush(stdout()) > > > > ### Name: b > > ### Title: Compute inverse cosine with angle given in degrees > > ### Aliases: ab > > ### Keywords: array > > > > ### ** Examples > > b(theta=30) >Error: could not find function "acos_d" >Execution halted > Anybody knows where the problem is and how to solve this? Is there better >method to obtain what i want? > Thanks > >-- >----------------- >Jane Chang >Queen's > > [[alternative HTML version deleted]]Michael Dewey http://www.aghmed.fsnet.co.uk