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