[R] Lapack routine dgesv: system is exactly singular
@okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Wed Dec 4 23:30:50 CET 2019
I am sorry for posting this question related to TWMR but it seems I
can nto proceed with this. Hopefully this post now will make sense.
So I am running this code:
I made this change in code so that I can run it like this:
Rscript MR.R ENSG00000154803
the change of the beginning of code is this:
cmd_args <- commandArgs(TRUE)
if (length(cmd_args) == 0L) stop("No arguments specified.")
gene<-cmd_args[length(cmd_args)] ## Last argument is the 'gene'
if (!file.exists(file)) stop("File not found: ", file)
The error I am getting when I run the code with my data is:
Error in solve.default(C) :
Lapack routine dgesv: system is exactly singular: U[15,15] = 0
Calls: solve -> solve.default
I loaded my ENSG00000154803.ld file in R as matrix (a) and:
is.singular.matrix(a, tol = 1e-08)
Seems that my matrix is singular. What do you advice in this case?
More information about the R-help