美文网首页
环境配置笔记4-解决R语言安装外源包编译报错:‘for’ loo

环境配置笔记4-解决R语言安装外源包编译报错:‘for’ loo

作者: 江湾青年 | 来源:发表于2021-05-21 22:12 被阅读0次

使用R安装外源包时发现报错:‘for’ loop initial declarations are only allowed in C99 mode:

这是因为gcc基于c89标准,换成C99标准就可以了,使用withr包可以指定使用的gcc标准:

library(withr)

with_makevars(c(PKG_CFLAGS = "-std=c11"),

install.packages('seriation'),        # my installation code

assignment = "+=")


参考

https://stackoverflow.com/questions/35198301/how-use-the-option-std-c99-for-installing-r-packages

相关文章

网友评论

      本文标题:环境配置笔记4-解决R语言安装外源包编译报错:‘for’ loo

      本文链接:https://www.haomeiwen.com/subject/pjxmjltx.html