
R
潼二
一个渣渣
展开
-
mac安装R包spdep报错ld: cannot find -lgfortran
参考stackoverflow的解决方法https://stackoverflow.com/questions/6302209/building-r-package-and-error-ld-cannot-find-lgfortran首先用homebrew确认gcc, g++, gfortran的版本,然后在路径~/.R/添加Makevars这个文件名的文件(不要带尾缀)文件内容:VER=-11CC=gcc$(VER)CXX=g++$(VER)CFLAGS=-mtune=native -g -O原创 2022-03-30 18:57:59 · 660 阅读 · 0 评论 -
R载入openxlsx包出错:cannot have attributes on a CHARSXP
环境:R 4.0.2, Pycharm R 插件报错:在载入ggplot2和RColorBrewer后载入openxlsx时报错cannot have attributes on a CHARSXP解决:重新加载R后首先加载openxlsx,再加载ggplot2和RColorBrewer原创 2020-08-08 16:52:39 · 1070 阅读 · 0 评论 -
R Mediation WARNING
在使用R的mediation包时提醒:Warning message:In mediate(b, c, sims = 1000, treat = "x", : treatment and control values do not match factor levels; using 1 and 2 as control and treatment, respectively查了一下,在这个链接 里有人回应,是因为你的x变量的取值个数大于2(即非二分变量),同时代码并未声明对哪个特定取值进行分原创 2020-07-15 23:35:08 · 1845 阅读 · 6 评论