How to modify a function in local R package? [clos

2019-06-14 20:21发布

I have an R package made by someone else. I want to add an additional function to it, how can I do that?

1条回答
祖国的老花朵
2楼-- · 2019-06-14 21:12

To change a function from a given package, you'll probably need trace function, it helps you edit and modify a function F

trace("F",edit=TRUE)

it will open a small window for you to modify the code, but it won't change the actual source code permanently. you can copy and paste the code and create a new function with your own modifications.

查看更多
登录 后发表回答