Execute a function from package after doing library(pkg)

前端 未结 1 1466
孤独总比滥情好
孤独总比滥情好 2021-01-12 05:06

Hi I have a package with a functions that makes a gui with gWidgets, is there a way I can get this to be executed on package load so the interface comes up straight away.

1条回答
  •  醉梦人生
    2021-01-12 05:13

    I think you want .onLoad which you dump in a .R file called zzz.R (traditionally). Here's an example where I've used this: github.com/trinker/gmailR/blob/master/R/zzz.R

    0 讨论(0)
提交回复
热议问题