Suppressing warnings
A warning tells the user that something has gone potentially wrong. Let's highlight a good use of the warning function.
Questo esercizio fa parte del corso
Defensive R Programming
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Create new variable
x <- c(___, ___, ___)
y <- 1:3
# Correlation coefficient of x & y
m <- cor(___, ___)