kaneplusplus / bigtabulate Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
edd@max:~$ install.r bigtabulate
trying URL 'https://cran.rstudio.com/src/contrib/bigtabulate_1.1.4.tar.gz'
Content type 'application/x-gzip' length 14126 bytes (13 KB)
==================================================
downloaded 13 KB
* installing *source* package ‘bigtabulate’ ...
** package ‘bigtabulate’ successfully unpacked and MD5 sums checked
checking for Sun Studio compiler...no
checking for OS...Linux
** libs
ccache g++ -I/usr/share/R/include -DNDEBUG -DLINUX -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/BH/include" -I"/usr/local/lib/R/site-library/bigmemory/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -O3 -Wall -pipe -Wno-unused -pedantic -c bigtabulate.cpp -o bigtabulate.o
In file included from bigtabulate.cpp:14:0:
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h: In member function ‘SEXPREC* NewVec<int>::operator()(index_type) const’:
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h:44:46: error: ‘Rcpp’ has not been declared
{SEXP operator()(index_type n) const {return Rcpp::IntegerVector(n);};};
^
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h: In function ‘SEXPREC* NEW_FLOAT(index_type)’:
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h:51:12: error: ‘Rcpp’ has not been declared
return Rcpp::wrap(out);
^
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h: In member function ‘SEXPREC* NewVec<double>::operator()(index_type) const’:
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h:60:46: error: ‘Rcpp’ has not been declared
{SEXP operator()(index_type n) const {return Rcpp::NumericVector(n);};};
^
In file included from /usr/local/lib/R/site-library/BH/include/boost/checked_delete.hpp:15:0,
from /usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:26,
from /usr/local/lib/R/site-library/BH/include/boost/shared_ptr.hpp:17,
from bigtabulate.cpp:7:
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp: In instantiation of ‘void boost::checked_delete(T*) [with T = BreakMapper<double>]’:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/detail/shared_count.hpp:134:38: required from ‘boost::detail::shared_count::shared_count(Y*) [with Y = BreakMapper<double>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:271:47: required from ‘void boost::detail::sp_pointer_construct(boost::shared_ptr<X>*, Y*, boost::detail::shared_count&) [with T = Mapper<double>; Y = BreakMapper<double>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:349:58: required from ‘boost::shared_ptr<T>::shared_ptr(Y*) [with Y = BreakMapper<double>; T = Mapper<double>]’
bigtabulate.cpp:438:7: required from ‘SEXPREC* TAPPLY(MatrixAccessorType, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP) [with RType = double; MatrixAccessorType = MatrixAccessor<double>; SEXP = SEXPREC*]’
bigtabulate.cpp:773:69: required from here
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type ‘BreakMapper<double>’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
delete x;
^
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp: In instantiation of ‘void boost::checked_delete(T*) [with T = IndexMapper<double>]’:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/detail/shared_count.hpp:134:38: required from ‘boost::detail::shared_count::shared_count(Y*) [with Y = IndexMapper<double>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:271:47: required from ‘void boost::detail::sp_pointer_construct(boost::shared_ptr<X>*, Y*, boost::detail::shared_count&) [with T = Mapper<double>; Y = IndexMapper<double>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:349:58: required from ‘boost::shared_ptr<T>::shared_ptr(Y*) [with Y = IndexMapper<double>; T = Mapper<double>]’
bigtabulate.cpp:445:7: required from ‘SEXPREC* TAPPLY(MatrixAccessorType, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP) [with RType = double; MatrixAccessorType = MatrixAccessor<double>; SEXP = SEXPREC*]’
bigtabulate.cpp:773:69: required from here
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type ‘IndexMapper<double>’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp: In instantiation of ‘void boost::checked_delete(T*) [with T = BreakMapper<int>]’:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/detail/shared_count.hpp:134:38: required from ‘boost::detail::shared_count::shared_count(Y*) [with Y = BreakMapper<int>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:271:47: required from ‘void boost::detail::sp_pointer_construct(boost::shared_ptr<X>*, Y*, boost::detail::shared_count&) [with T = Mapper<int>; Y = BreakMapper<int>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:349:58: required from ‘boost::shared_ptr<T>::shared_ptr(Y*) [with Y = BreakMapper<int>; T = Mapper<int>]’
bigtabulate.cpp:438:7: required from ‘SEXPREC* TAPPLY(MatrixAccessorType, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP) [with RType = int; MatrixAccessorType = MatrixAccessor<int>; SEXP = SEXPREC*]’
bigtabulate.cpp:783:69: required from here
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type ‘BreakMapper<int>’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp: In instantiation of ‘void boost::checked_delete(T*) [with T = IndexMapper<int>]’:
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/detail/shared_count.hpp:134:38: required from ‘boost::detail::shared_count::shared_count(Y*) [with Y = IndexMapper<int>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:271:47: required from ‘void boost::detail::sp_pointer_construct(boost::shared_ptr<X>*, Y*, boost::detail::shared_count&) [with T = Mapper<int>; Y = IndexMapper<int>]’
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/shared_ptr.hpp:349:58: required from ‘boost::shared_ptr<T>::shared_ptr(Y*) [with Y = IndexMapper<int>; T = Mapper<int>]’
bigtabulate.cpp:445:7: required from ‘SEXPREC* TAPPLY(MatrixAccessorType, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP) [with RType = int; MatrixAccessorType = MatrixAccessor<int>; SEXP = SEXPREC*]’
bigtabulate.cpp:783:69: required from here
/usr/local/lib/R/site-library/BH/include/boost/core/checked_delete.hpp:34:5: warning: deleting object of polymorphic class type ‘IndexMapper<int>’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
In file included from bigtabulate.cpp:14:0:
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h:60:69: warning: control reaches end of non-void function [-Wreturn-type]
{SEXP operator()(index_type n) const {return Rcpp::NumericVector(n);};};
^
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h: In member function ‘SEXPREC* NewVec<int>::operator()(index_type) const’:
/usr/local/lib/R/site-library/bigmemory/include/bigmemory/util.h:44:69: warning: control reaches end of non-void function [-Wreturn-type]
{SEXP operator()(index_type n) const {return Rcpp::IntegerVector(n);};};
^
/usr/lib/R/etc/Makeconf:143: recipe for target 'bigtabulate.o' failed
make: *** [bigtabulate.o] Error 1
ERROR: compilation failed for package ‘bigtabulate’
* removing ‘/usr/local/lib/R/site-library/bigtabulate’
* restoring previous ‘/usr/local/lib/R/site-library/bigtabulate’
The downloaded source packages are in
‘/tmp/downloaded_packages’
Warning message:
In install.packages(f, lib, if (isMatchingFile(f)) NULL else repos) :
installation of package ‘bigtabulate’ had non-zero exit status
edd@max:~$
The most recent version of bigtabulate (1.1.5) appears to introduce an error in the bigsplit
function which I didn't encounter in version 1.1.4. Attempting to use this function to get the indices which correspond to table levels (via the default splitcol=NA
parameter) results in an error:
library(bigtabulate)
xbm <- as.big.matrix(matrix(c(0:1, 0:1, 1:4), ncol=2))
bigsplit(xbm, 1)
## Error in bigtabulate(x, ccols = ccols, breaks = breaks, table = FALSE, : REAL() can only be applied to a 'numeric', not a 'logical'
However, following the clue of the error message, it appears that the following workaround works:
bigsplit(xbm, 1, splitcol=NA_real_)
## $`0`
## [1] 1 3
##
## $`1`
## [1] 2 4
I believe the problem is at line 480 in bigtabulate.cpp. My apologies for the lack of pull request.
And my thanks for this immensely useful package!
sessionInfo()
## R version 3.2.2 (2015-08-14)
## Platform: x86_64-apple-darwin14.5.0 (64-bit)
## Running under: OS X 10.10.5 (Yosemite)
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] bigtabulate_1.1.5 biganalytics_1.1.14 biglm_0.9-1
## [4] DBI_0.3.1 foreach_1.4.3 bigmemory_4.5.19
## [7] bigmemory.sri_0.1.3
##
## loaded via a namespace (and not attached):
## [1] Rcpp_0.12.5 codetools_0.2-14 digest_0.6.9
## [4] formatR_1.4 magrittr_1.5 evaluate_0.9
## [7] stringi_1.1.1 rmarkdown_0.9.5.3 iterators_1.0.8
## [10] tools_3.2.2 stringr_1.0.0 yaml_2.1.13
## [13] htmltools_0.3.5 knitr_1.13
See here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.