Logical
variable represent false/true.
Prevoius
Next
Home
> a=1; b=2 > a>b [1] FALSE > > c=a>b > > c [1] FALSE > > class(c) [1] "logical"
Following
are the logical Boolean operations
& (and)
| (or)
! (negation)
> var1=FALSE; var2=TRUE > > var3= var1 & var2 > var3 [1] FALSE > > var4 = var1 | var2 > var4 [1] TRUE > > var5 = !var4 > var5 [1] FALSE >
No comments:
Post a Comment