# Demonstrate warning message #x <- -1 #if (x < 0) { # warning("x is negative") #} # Demonstrate stop message #x <- -1 #if (x < 0) { # stop("x cannot be negative") #}