Hi, i create two constants kilo and milli in [1]. These should be available after loading library(sitools) How should i export them and what have i done wrong? (Other suggestions for improving the package are welcome too) The ready to use .tar.gz and the source can be found on github [2,3] kind regatds, [1] https://github.com/jonasstein/sitools/blob/master/init.R [2] https://github.com/jonasstein/sitools/downloads [3] https://github.com/jonasstein/sitools -- Jonas Stein <news at jonasstein.de>
Try adding LazyData: yes to the DESCRIPTION file. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Jonas Stein > Sent: Tuesday, January 17, 2012 4:41 PM > To: r-help at stat.math.ethz.ch > Subject: [R] R package dev: how to export constant? > > Hi, > i create two constants kilo and milli in [1]. These should be available > after loading > > library(sitools) > > How should i export them and what have i done wrong? > (Other suggestions for improving the package are welcome too) > > The ready to use .tar.gz and the source can be found on github [2,3] > > kind regatds, > > [1] https://github.com/jonasstein/sitools/blob/master/init.R > [2] https://github.com/jonasstein/sitools/downloads > [3] https://github.com/jonasstein/sitools > > -- > Jonas Stein <news at jonasstein.de> > > ______________________________________________ > 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.
Hello, Jonas, I've just seen your function 'sistring' code and it's different from the code in R-help, Ben.BigHair, Jan 06, 2012 reply to the thread "automatic SI prefixes as ticklabels on axis". The difference is that it's not "as.character(x)", it should be "as.character(number)" (The function parameter's name has changed...) Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/R-package-dev-how-to-export-constant-tp4305281p4305569.html Sent from the R help mailing list archive at Nabble.com.
On 2012-01-18, William Dunlap <wdunlap at tibco.com> wrote:> Try adding > LazyData: yes > to the DESCRIPTION file. >> [3] https://github.com/jonasstein/sitoolsThank you. Now it works and I could add all SI prefixes. -- Jonas Stein <news at jonasstein.de>
Hi Jonas, hi the list> Try adding > LazyData: yes > to the DESCRIPTION file.I am a bit surprise by this answer since I found in writing R extentions, that lazydata is ignore since version 2.14. But I have the same problem, I do not manage to export contants. So how can I do that? My constant is MAX_CLUST <- 26. Shall I define it in a code in the /R/ directories, or in a /data/ directories? I try both, neither works... Shall I mention it in NAMESPACE? How? Is there a way to make this constant available as soon as the package will be loaded without using data()? Thanks Christophe -- View this message in context: http://r.789695.n4.nabble.com/R-package-dev-how-to-export-constant-tp4305281p4326840.html Sent from the R help mailing list archive at Nabble.com.