How do you determine the namespace of a function?

后端 未结 5 547
予麋鹿
予麋鹿 2020-11-30 05:48

Given a function, how do you determine which namespace it has come from?

For example, if I type mean.default at the command prompt, the output includes

5条回答
  •  时光说笑
    2020-11-30 06:08

    I very recently learned about find() which seems to do just this.

    R> find("ls")
    [1] "package:base"
    R> find("na.locf")
    [1] "package:zoo"
    

提交回复
热议问题