Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何计算对match.call()的调用?_R_Debugging_Evaluation_Causality - Fatal编程技术网

R 如何计算对match.call()的调用?

R 如何计算对match.call()的调用?,r,debugging,evaluation,causality,R,Debugging,Evaluation,Causality,我正在尝试使用一个名为“causaldrf”的R库的一些函数。比方说,在库中,我们有一个函数“func(a,b)”,它接受字符串“a”,并调用数据帧“b”中名为“a”的列 函数的实现方式如下(简化): func(a,b){ tempcall包含打印(tempcall$a)在函数体中,它打印参数的值。或者让函数返回tempcall$a+tempcall$b。这就是您要找的吗?谢谢您的评论。我明白您的意思,但我不想弄乱我正在使用的库的源代码。我目前正在这样做,但我得到了一个巨大的数字其他(预期)错误

我正在尝试使用一个名为“causaldrf”的R库的一些函数。比方说,在库中,我们有一个函数“func(a,b)”,它接受字符串“a”,并调用数据帧“b”中名为“a”的列

函数的实现方式如下(简化):

func(a,b){

tempcall包含
打印(tempcall$a)
在函数体中,它打印参数的值。或者让函数返回
tempcall$a+tempcall$b
。这就是您要找的吗?谢谢您的评论。我明白您的意思,但我不想弄乱我正在使用的库的源代码。我目前正在这样做,但我得到了一个巨大的数字其他(预期)错误。这是因为“tempcall”及其参数在库中的许多地方都使用。我想知道是否有一种方法可以在不改变函数体的情况下解决这个问题?
func(a,b){
tempcall <- match.call()
Operation then performed on tempcall, for example:
my_string <- tempcall$a 
}