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

SFu*_*n28 4 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
Run Code Online (Sandbox Code Playgroud)

koh*_*ske 7

尝试:

identical(test, lm)
identical(test, test2)
Run Code Online (Sandbox Code Playgroud)