简体   繁体   English

MonetDB嵌入式R代码调试

[英]MonetDB embedded R code debugging

In my efforts to work around the issue mentioned here: MonetDB connect to GO.db within R code that is run in-database 在我努力解决这里提到的问题: MonetDB连接到在数据库中运行的R代码中的GO.db

I went ahead and copied the code from WGCNA that I needed to my own package and installed it. 我继续将我需要的WGCNA代码复制到我自己的软件包并安装它。 Obviously, I now can load the package without any issues (since I didn't need the GO.db part). 显然,我现在可以加载包没有任何问题(因为我不需要GO.db部分)。

However, I seem to run into another issue: 但是,我似乎遇到了另一个问题:

Server says '!Error running R expression. 服务器说'!运行R表达式时出错。 Error message: Error in .C("corFast", x = as.double(x), nrow = as.integer(nrow(x)), ncolx = as.integer(ncol(x)), : '. 错误消息:.C中出错(“corFast”,x = as.double(x),nrow = as.integer(nrow(x)),ncolx = as.integer(ncol(x)),:'。

I indeed wanted to use the faster cor function from WGCNA, but apparently the C call now creates another issue. 我确实想使用WGCNA中更快的cor函数,但显然C调用现在会产生另一个问题。 Unfortunately, the message is not informative. 不幸的是,该消息并不提供信息。 I already tried to run the query interactively and adding debug to the statement. 我已经尝试以交互方式运行查询并将语句添加到语句中。 This did not provide me with more information. 这并没有为我提供更多信息。

Is there anything that I can do to increase the verbosity, so that I can debug the proces? 我能做些什么来增加冗长度,以便我可以调试过程吗?

I also tried: 我也尝试过:

options(monetdb.debug.query=F)

This resulted in a bit of extra output prior to the query, but no extra output on the error that occurred. 这会在查询之前产生一些额外的输出,但是在发生的错误上没有额外的输出。

Using the suggestion of Hannes Muehleisen I added: 根据Hannes Muehleisen的建议,我补充说:

options(monetdb.debug.mapi=T)

It does add a little more information, which allowed me to proceed a bit further. 它确实添加了一些信息,这让我可以继续前进。 I am now stuck with the following error, which seems again truncated. 我现在卡在以下错误,似乎再次被截断。

QQ: 'SELECT * FROM cor_test();' QQ:'SELECT * FROM cor_test();' TX: 'sSELECT * FROM cor_test(); TX:'sSELECT * FROM cor_test(); ; ; RX: '!Error running R expression. RX:'!运行R表达式时出错。 Error message: Error in .C("corFast", x = as.double(x), nrow = as.integer(nrow(x)), ncolx = as.integer(ncol(x)), : ! "corFast" not available for .C() for package "MRMRF Error in .local(conn, statement, ...) : Unable to execute statement 'SELECT * FROM cor_test();'. Server says '!Error running R expression. Error message: Error in .C("corFast", x = as.double(x), nrow = as.integer(nrow(x)), ncolx = as.integer(ncol(x)), : '. 错误消息:.C中出错(“corFast”,x = as.double(x),nrow = as.integer(nrow(x)),ncolx = as.integer(ncol(x)),:!“corFast”不适用于.C()包“MRMRF .local中的错误(conn,statement,...):无法执行语句'SELECT * FROM cor_test();'。服务器说'!运行R表达式时出错。错误信息:.C中的错误(“corFast”,x = as.double(x),nrow = as.integer(nrow(x)),ncolx = as.integer(ncol(x)),:'。

Yes this is a known issue where only the first line of the error message is returned. 是的,这是一个已知问题,只返回错误消息的第一行。 We should fix this. 我们应该解决这个问题 I always use stop(whatever) to return some info from within the UDF. 我总是使用stop(whatever)从UDF中返回一些信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM