简体   繁体   English

如何在R中编辑package函数?

[英]How to edit package functions in R?

I would like to make subtle changes to a visualisation from the UpSetR package. Within the upset() function there is another sub-function called Make_size_plot() that creates the bar chart which I would like to change.我想对 UpSetR package 的可视化进行细微更改。在upset() function 中,还有另一个名为Make_size_plot()的子函数,它创建了我想要更改的条形图。

library(UpSetR)

I figured using the trace() function would be one way to do it.我认为使用trace() function 是一种方法。

trace(upset, edit=T)

However, I only managed to edit the upset() function but not the Make_size_plot() function on line 162 within the upset() function.但是,我只设法在 upset() function 中编辑了第 162 行的upset() function 而不是Make_size_plot() upset() function。

How can I edit the Make_size_plot() function the easiest way, eg without creating my own package or forking the Github repo?如何以最简单的方式编辑Make_size_plot() function,例如,无需创建我自己的 package 或分叉 Github 存储库?

have you tried你有没有尝试过

trace(UpSetR:::Make_size_plot, edit=T)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM