在这篇文章https://stackoverflow.com/a/3417894/168689中,语法obj <- {}
引起了我的注意。我对它还很陌生,以前从未见过它,所以我启动了我的控制台:R
obj <- {}
class(obj)
并找到了一个类对象NULL
。
class(obj)
[1] "NULL"
I'd like to know the opinions on this technique in the R community. Is there merit in it? Do the possible downsides (really, no class?) outweigh those?