由买买提看人间百态

topics

全部话题 - 话题: funcnm
(共0页)
a***d
发帖数: 336
1
来自主题: Statistics版 - R同名函数问题
this is what I usually do. there are probably much better ways of doing it.
your function is usually in .globalEnv unless you specify otherwise.
so to get your function, use:
fun1 <- get(funcNm, env=.GlobalEnv)
use search() to find out position of the package. if the package is the nth
package in the search path, use:
fun2 <- get(funcNm, pos=n)
(共0页)