Page 220 - Data Science class 11
P. 220
first <- c(3,0,TRUE,4+4i)
print(!first)
The following result is produced:
4. && The logical AND operator: It takes the first element of both the vectors and gives TRUE only if both
are TRUE.
Example
Enter the following code snippet:
first <- c(4,0,TRUE,4+4i)
second <- c(1,3,TRUE,8+9i)
print(first&&second)
Following result is produced:
5. || Called Logical OR operator: It takes the first element of both the vectors and gives TRUE if one of them
is TRUE.
Example
Enter the following code snippet:
first <- c(0,0,TRUE,4+4i)
second <- c(0,3,TRUE,9+3i)
print(first||second)
The following result is produced:
218 Touchpad Data Science-XI

