如何解决无法使用R 4.0.3和RedHat Linux 6.10安装RcppArmadillo
我刚在计算群集的本地目录中安装了R 4.0.3。
我正在使用gcc 5.1.0,并且已设置Sys.setenv(“ PKG_CXXFLAGS” =“-std = c ++ 11”)
Rcpp安装良好。
但是使用RcppArmadillo,我会收到数百行这样的错误消息
../inst/include/armadillo_bits/gmm_full_meat.hpp:169:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(hefts) = in_hefts;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘void arma::gmm_priv::gmm_full<eT>::set_means(const arma::Base<eT,T1>&)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:191:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(means) = in_means;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘void arma::gmm_priv::gmm_full<eT>::set_fcovs(const arma::BaseCube<eT,T1>&)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:216:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(fcovs) = in_fcovs;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘void arma::gmm_priv::gmm_full<eT>::set_hefts(const arma::Base<eT,T1>&)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:246:28: error: ‘rw’ is not a member of ‘arma::access’
eT* hefts_mem = access::rw(hefts).memptr();
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:253:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(hefts) /= accu(hefts);
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘bool arma::gmm_priv::gmm_full<eT>::load(std::__cxx11::string)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:289:36: error: ‘arma_binary’ was not declared in this scope
bool status = storage.load(name,arma_binary);
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:315:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(means) = storage_means;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:316:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(hefts) = storage_hefts;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:329:5: error: ‘rw’ is not a member of ‘arma::access’
access::rw(fcovs).slice(g) = storage_fcov;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘bool arma::gmm_priv::gmm_full<eT>::save(std::__cxx11::string) const’:
我完全迷路了。请帮忙!
解决方法
我在RedHat 7.5的R 4.0.3上遇到了相同的问题 这对我有用:
install.packages("RcppArmadillo",repos="https://rcppcore.github.io/drat")
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。