Re: [Rcpp-devel] package .onLoad multiple modules
Oops, please ignore the second request; it is documented in Rcpp-modules. Thanks, baptiste On 24 June 2011 15:16, baptiste auguie wrote: > Hi, > > I have a couple of follow-up questions re: this old thread: > > - could we expect a CRAN release of Rcpp soon? (I am relying on this > new argument to loadRcppModules(), which means that my package would > currently fail on CRAN, and even on r-forge (I'm not sure how to > specify Rcpp >= 0.9.4.2 as import). > > - R/zzz.r in my package now reads, > > cda <- new( "Module" ) > cd <- new( "Module" ) > linear <- new( "Module" ) > array <- new( "Module" ) > > .onLoad <- function(pkgname, libname){ > loadRcppModules(direct=FALSE) > } > > which is much cleaner than before; however, R CMD check still complains > WARNING Undocumented code objects: > array cd linear > All user-level objects in a package should have documentation entries. > > Can I hide them, or is there a documentation format for Modules? > > Thanks, and best regards, > > baptiste > > PS: full package is at > https://r-forge.r-project.org/scm/viewvc.php/pkg/cda/?root=photonics > > sessionInfo() > R version 2.13.0 (2011-04-13) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] en_NZ.UTF-8/en_NZ.UTF-8/C/C/en_NZ.UTF-8/en_NZ.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets grid > methods base > > other attached packages: > [1] cda_1.0 statmod_1.4.10 RcppArmadillo_0.2.23 > Rcpp_0.9.4.2 ggplot2_0.8.9 proto_0.3-9.2 > [7] reshape_0.8.4 plyr_1.5.2 > > > > On 1 June 2011 15:43, baptiste auguie wrote: >> On 31 May 2011 23:19, wrote: >>> >>> Le 31 mai 2011 à 13:11, Christian Gunning a écrit : >>> On Tue, May 31, 2011 at 3:00 AM, wrote: > When FALSE it does what you want. >> >> Fantastic, thanks a lot. >> >> baptiste >> I can't begin to describe how long I've waited for such a function. -x >>> >>> :-) >>> Well it does what you want ... in this context... >>> >>> It might not accomodate other needs you might have such as time travel, etc >>> ... >>> -- A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama! >>> ___ >>> Rcpp-devel mailing list >>> Rcpp-devel@lists.r-forge.r-project.org >>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >>> >> > ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Short blog post on loop speed in R
On Sun, Jun 19, 2011 at 11:20 AM, Douglas Bates wrote: > > > As for the use of Rcpp, the STL containers and algorithms can be > exploited to an even greater extent. If you are willing to jump > through the hoops of defining a struct that inherits from > std::binary_function then you can shorten the Rcpp-based code > considerably. Thanks for this, by the way. I added it to the post (which got a shout-out from David on the Revolutions blog), along with your comments about apply(). Strictly speaking, it's 8 vs. 6 lines of code. I guess "considerably shorter" is in the eye of the beholder :). It's a neat template example, in any case. -xian -- A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama! ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] package .onLoad multiple modules
Hi, I have a couple of follow-up questions re: this old thread: - could we expect a CRAN release of Rcpp soon? (I am relying on this new argument to loadRcppModules(), which means that my package would currently fail on CRAN, and even on r-forge (I'm not sure how to specify Rcpp >= 0.9.4.2 as import). - R/zzz.r in my package now reads, cda <- new( "Module" ) cd <- new( "Module" ) linear <- new( "Module" ) array <- new( "Module" ) .onLoad <- function(pkgname, libname){ loadRcppModules(direct=FALSE) } which is much cleaner than before; however, R CMD check still complains WARNING Undocumented code objects: array cd linear All user-level objects in a package should have documentation entries. Can I hide them, or is there a documentation format for Modules? Thanks, and best regards, baptiste PS: full package is at https://r-forge.r-project.org/scm/viewvc.php/pkg/cda/?root=photonics sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_NZ.UTF-8/en_NZ.UTF-8/C/C/en_NZ.UTF-8/en_NZ.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets grid methods base other attached packages: [1] cda_1.0 statmod_1.4.10 RcppArmadillo_0.2.23 Rcpp_0.9.4.2 ggplot2_0.8.9proto_0.3-9.2 [7] reshape_0.8.4plyr_1.5.2 On 1 June 2011 15:43, baptiste auguie wrote: > On 31 May 2011 23:19, wrote: >> >> Le 31 mai 2011 à 13:11, Christian Gunning a écrit : >> >>> On Tue, May 31, 2011 at 3:00 AM, >>> wrote: When FALSE it does what you want. > > Fantastic, thanks a lot. > > baptiste > >>> >>> I can't begin to describe how long I've waited for such a function. >>> -x >> >> :-) >> Well it does what you want ... in this context... >> >> It might not accomodate other needs you might have such as time travel, etc >> ... >> >>> >>> -- >>> A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama! >> ___ >> Rcpp-devel mailing list >> Rcpp-devel@lists.r-forge.r-project.org >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel >> > ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
[Rcpp-devel] templated NA
Is there a templated version of NA with Rcpp, or perhaps some sugar statement, such that the following might be valid statements? typedef double mytime; const mytime time_unknown = Rcpp::NA; Thanks, Andrew ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] changes Armadillo 1.99.5
Hi Conrad, On 23 June 2011 at 20:11, Conrad Sand wrote: | Hi everyone, | | I've just released Armadillo 1.99.5, which is likely to get wrapped up | in the next release of RcppArmadillo. Thanks a lot for detailing the changes, and of course for Armadillo itself. Your 1.99.5 code is now in our SVN, and RcppArmadillo 0.2.23 awaits processing at CRAN. If any users of RcppArmadillo, seeing the changes below, feels motivated to add some more unit tests I'd be more than happy to help integrate them into the package. Dirk | See http://arma.sourceforge.net/ | | The 1.99.x series are beta releases for the upcoming 2.0 release. | | There are a few minor but important API changes and additions in | 1.99.5, elaborated below: | | API changes: | | (i) | Forms of decomposition/inverse/solver functions that do not return a | bool indicating success will now throw std::runtime_error exceptions | when failures are detected Affected functions: chol(), eig_sym(), | eig_gen(), inv(), lu(), pinv(), princomp(), qr(), solve(), svd(), | syl(). | | (ii) | princomp_cov() has been removed as it was a superfluous function. | princomp() in conjunction with cov() can be used instead. | | (iii) | set_log_stream() and get_log_stream() have been replaced by | set_stream_err1() and get_stream_err1(). | | | API additions: | | (iv) | det(), inv() and solve() can be forced to use more precise algorithms | for tiny matrices (sizes <= 4x4). | | (v) | Added loading & saving of matrices as CSV text files. | ___ | Rcpp-devel mailing list | Rcpp-devel@lists.r-forge.r-project.org | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel -- Gauss once played himself in a zero-sum game and won $50. -- #11 at http://www.gaussfacts.com ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
[Rcpp-devel] changes Armadillo 1.99.5
Hi everyone, I've just released Armadillo 1.99.5, which is likely to get wrapped up in the next release of RcppArmadillo. See http://arma.sourceforge.net/ The 1.99.x series are beta releases for the upcoming 2.0 release. There are a few minor but important API changes and additions in 1.99.5, elaborated below: API changes: (i) Forms of decomposition/inverse/solver functions that do not return a bool indicating success will now throw std::runtime_error exceptions when failures are detected Affected functions: chol(), eig_sym(), eig_gen(), inv(), lu(), pinv(), princomp(), qr(), solve(), svd(), syl(). (ii) princomp_cov() has been removed as it was a superfluous function. princomp() in conjunction with cov() can be used instead. (iii) set_log_stream() and get_log_stream() have been replaced by set_stream_err1() and get_stream_err1(). API additions: (iv) det(), inv() and solve() can be forced to use more precise algorithms for tiny matrices (sizes <= 4x4). (v) Added loading & saving of matrices as CSV text files. ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Wrapping uBlas Matrices into Rcpp Matrices
Dear Douglas, Thank you very much for your codes. It took me ages to get back to this. Your templated ublas2rcpp works perfectly. Thanks again, Cedric On 09/06/11 17:29, Douglas Bates wrote: I attach a templated function ublas2rcpp that uses an intermediate to generate the Rcpp matrix. This ensures that column major ordering is used. ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel