NAs introduced by coersion

Hi R studio community,

I want to stop the programming when "NAs introduced by coercion."

For example


This returns
[1] 2 NA 0

Warning message: :NAs introduced by coercion

How can i return an error when this happens?

This should solve:


This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.