当我发出命令时:
install.packages("FeatureHashing")
源代码已正确下载并解压缩但随后出现了大量编译错误,从以下开始:
as.cpp: In function ‘void pair_sort(int*, double*, std::size_t)’:
as.cpp:26:83: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
std::sort(ref.begin(), ref.end(), [&](size_t a, size_t b) { return i[a] < i[b]; });
^
as.cpp:26:84: error: no matching function for call to ‘sort(std::vector<long unsigned int>::iterator, std::vector<long unsigned int>::iterator, pair_sort(int*, double*, std::size_t)::<lambda(std::size_t, std::size_t)>)’
std::sort(ref.begin(), ref.end(), [&](size_t a, size_t b) { return i[a] < i[b]; });
正如Wush Wu的GitHub问题页面上有关在RedHat下安装问题的建议:
https://github.com/wush978/FeatureHashing/issues/116
我安装了gcc 4.8和g ++ 4.8
如果安装成功,我需要做什么?