What does the operator ! do in R?

What does the operator ! do in R?

a) Negates a logical value
b) Performs logical AND
c) Multiplies two numbers
d) Divides two numbers

Answer:

a) Negates a logical value

Explanation:

The ! operator in R is a logical negation operator, reversing the logical value.

Reference:

R Programming – Operators MCQ Questions and Answers

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top