I added comments where necessary to indicate that na_if() no longer works in newer tidyverse versions. mutate(across(where(is.numeric), ~na_if(., -9999))) should be used instead.
This should probably be cleaner and using the mutate-across... code directly. But I left it in for now to avoid confusion.
I added comments where necessary to indicate that
na_if()
no longer works in newer tidyverse versions.mutate(across(where(is.numeric), ~na_if(., -9999)))
should be used instead.This should probably be cleaner and using the mutate-across... code directly. But I left it in for now to avoid confusion.