相关疑难解决方法(0)

永久更换功能

有人可以解释下面的代码吗?我正在用我自己的版本替换图形包中的布局功能,但它似乎神奇地重新出现

env = environment( graphics:::layout )
unlockBinding( "layout" , env = env )
assign( "layout" , function(){} , envir = env )
lockBinding( "layout" , env = env )

# this still shows the original layout function!  how is that possible?
layout

# this shows function(){} as expected
graphics:::layout
Run Code Online (Sandbox Code Playgroud)

r

5
推荐指数
1
解决办法
439
查看次数

标签 统计

r ×1