Exercise

Suppressing warnings

A warning tells the user that something has gone potentially wrong. Let's highlight a good use of the warning function.

Instructions 1/2

undefined XP
    1
    2
  • Create a variable x that is the value 1 repeated three times.
  • Calculate the correlation coefficient of x and y using the cor() function. Store the result in an object m.