【发布时间】:2011-10-31 12:40:58
【问题描述】:
可能重复:
R: subset() logical-and operator for chaining conditions should be & not &&
R 中 AND、OR 逻辑运算符的短(&、|)和长(&&、||)形式有什么区别?
例如:
x==0 & y==1x==0 && y==1x==0 | y==1x==0 || y==1
我总是在我的代码中使用简写形式。有什么缺点吗?
【问题讨论】:
标签: r logical-operators