Question

Exercise 1.1. Predict the result of the following R statements. Explain the reason ing behind the results a exp(-Inf) b. NA =
0 0
Add a comment Improve this question Transcribed image text
Answer #1

ANSWER:

GIVEN THAT

  

1 .The result of the following R statements :

a) exp(-Inf)

        Result: 0

  • This is because exp(-Inf) = 1/exp(Inf) = 1/Inf, which is equal to 0. Here, Inf = \infty .

(b) NA==NA

Result: NA

  • NA means missing data, so since we are checking whether NA is equal to NA, we also get NA, since we have no information about it.

(c) NA==NULL

Result: logical (0)

  • NULL is an empty object and NA is a logical value indicating missing data. So, when we are checking their equivalence, we get back an empty object, since we are not getting any response.

(d) NULL==NULL

Result: logical (0)

  • When we are checking the equivalence of 2 empty objects, we are getting back an empty object.

(e) NA & FALSE

Result: FALSE

  • Both NA and FALSE are logical values, but since they denote 2 different things, there is no common characteristic between them.
  • Hence, we are getting back FALSE.
Add a comment
Know the answer?
Add Answer to:
Exercise 1.1. Predict the result of the following R statements. Explain the reason ing behind the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT