I have an R package made by someone else. I want to add an additional function to it, how can I do that?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.