remove na from vector r

# Create a vector 'r' with NA values
r <- c(1, 2, NA, 4, 5, NA, 7)

# Remove NA values from the vector
r <- r[!is.na(r)]