R成精系列-R 错误汇总

Error in solve.default(crossprod(ZBeta)) :

Lapack例行程序dgesv: 系统正好是奇异的: U[58,58] = 0

矩阵非满秩,存在逆矩阵的前提是方阵要满秩。你出错的原因,应该在hhh这个矩阵里,最少有两列或者两行完全相同,或者线性相关系数特别高,才会出现这样的问题。

Error in xj[i] : 类别为'list'的下标不对

pooltest(Y ~ Ward + AC ,data=panel_data,model="within",effect="individual")

Error in FUN(X[[i]], ...) : insufficient number of observations

R

小于负一如何表示?

Keans算法聚类报错

Error in sample.int(m, k) : 第一个参数不对

Error in do_one(nmeth) : 外接函数调用时不能有NA/NaN/Inf(arg1)

安装包出错

Warning in install.packages :

installation of package ‘bindrcpp’ had non-zero exit status

address 0x18, cause 'memory not mapped'

make: /usr/local/clang4/bin/clang: No such file or directory

make: *** [assumptions.o] Error 1

Mac OS X环境下R语言packages安装包出现”make: /usr/local/clang4/bin/clang: No such file or directory”的解决办法

下载Clang4

http://r.research.att.com/libs/

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'

ld: library not found for -lgfortran

clang-7: error: linker command failed with exit code 1 (use -v to see invocation)

make: ***** [mclust.so**] Error 1

ERROR: compilation failed for packagemclust

*** removing** ‘/Library/Frameworks/R.framework/Versions/3.5.1-MRO/Resources/library/mclust

*** restoring previous** ‘/Library/Frameworks/R.framework/Versions/3.5.1-MRO/Resources/library/mclust

向量

Rstan 报错

Error in compileCode(f, code, language = language, verbose = verbose) :

Compilation ERROR, function(s)/method(s) not created! In file included from file2e1d20815b01.cpp:8:

In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4:

In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math.hpp:4:

In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4:

In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:4:

In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4:

/Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/memory/stack_alloc.hpp:145:10: warning: 'auto' type specifier is a C++11 extension [****-Wc++11-extensions****]

for (auto& blo

此外: Warning messages:

1: In (function (file, model_name = "anon_model", model_code = "", :

StanHeaders version is ahead of rstan version; update to latest rstan

2: In system(cmd, intern = !verbose) :

运行命令'/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file2e1d20815b01.cpp 2> file2e1d20815b01.cpp.err.txt'的状态是1

echo "alias g++='g++ -std=c++11'" >> ~/.bashrc'

source ~/.bashrc

Sys.setenv(USE_CXX14=1)

https://discourse.mc-stan.org/t/compilation-error-on-mac/5933

cartography包报错propSymbolsChoroLayer()

Error in col[inter] : object of type 'closure' is not subsettable

sa.fit <- pairwise.comparison(eset.rma, "treatment", c("None", "STZ"))

报错

Error in a.samples****[, 1****] : subscript out of bounds

列下表超限

select 数据时报错

mydata%>% select(race1=raceName,

round1=round,

date1 =date,

drivergivenname=Results.Driver.giveName,

driverfamilyname=Results.Driver.familyName,

constructor =Results.Constructor.name,

position=Results.position,

points=Results.points)

Error: Can't bind data because some arguments have the same name

批量library包时报错

sapply(packages,library)

Error in FUN(c("car", "MASS", "plyr", "lmtest", "zoo", "stats")[[1L]], :
'package' must be of length 1

需要加character.only=TRUE

sapply(packages,library,character.only=TRUE)

req.pcg <- function(pcg){

new <- pcg[!(pcg %in% installed.packages()[, "Package"])]

if (length(new)) install.packages(new, dependencies = T)

sapply(pcg, require, ch = T)

}

In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :

cannot open compressed file 'bitops/DESCRIPTION', probable reason 'No such file or directory'

安装离线包的时候,包的名字和程序里面的名字对不上。

你可能感兴趣的:(R成精系列-R 错误汇总)