Warning converted to error >> entire code base damaged

Hi guys. I guess someone changed some default R behaviour, which caused my entire code base on a large analysis to collapse :open_mouth:

Error: (converted from warning) There were 2 warnings in `mutate()`.
The first warning was:
ā„¹ In argument: `across(contains("COUNTER"), as.numeric)`.
Caused by warning:
! NAs introduced by coercion

In mutate there is no way (as far as i know) to explicitly treat NA values. I dont care in my specific cases that numeric values are turning to NA.

PLEASE, change it back to warning! It also changed in join_*. what used to give a warning of relationship (many to many), now throws an error. fortunately, that is annoying but easy to fix by adding the relevant argument.

Thank you

if you have options for warn set to 2 or higher all warnings become errors, you can set to 1 or lower to avoid that.

options(warn=1)
# then your code
1 Like

I kinda figured there would be a way around it. thanks for pointing me straight to the solution.

R guys, this is not funny!

This topic was automatically closed 7 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.