Tests if vector can be interpreted as numeric without introducing NAs by coercion
possibly_numeric(data)
data
logical
c("1","5") |> possibly_numeric() c("1","5","e") |> possibly_numeric()
Useful links