Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.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 测试两个函数变量是否指向同一个函数?_R - Fatal编程技术网

R 测试两个函数变量是否指向同一个函数?

R 测试两个函数变量是否指向同一个函数?,r,R,如何测试两个函数变量指向同一个函数 test = lm test2 = lm test == lm # error: comparison (1) is possible only for atomic and list types test == test2 # error: comparison (1) is possible only for atomic and list types 尝试: 尝试: 注:这两个函数不“指向”同一个函数,它们是lm函数代码的独立副本。右…函数

如何测试两个函数变量指向同一个函数

test = lm
test2 = lm

test == lm     # error: comparison (1) is possible only for atomic and list types
test == test2  # error: comparison (1) is possible only for atomic and list types
尝试:

尝试:


注:这两个函数不“指向”同一个函数,它们是lm函数代码的独立副本。右…函数编程=)注:这两个函数不“指向”同一个函数,它们是lm函数代码的独立副本。右…函数编程=)
identical(test, lm)
identical(test, test2)