na_to_0 function

Convert NA to zero on numeric variables

Convert NA to zero on numeric variables

This function Convert NA to zero on numeric variables outside of mutate. this is used due to changes on dplyr 1.1.0.

na_to_0(df)

Arguments

  • df: A data frame

Returns

a data frame

Examples

library(forestmangr) data("exfm15") head(exfm15) # Turn NA values to zero only on numeric values exfm15 %>% na_to_0()

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

  • Maintainer: Sollano Rabelo Braga
  • License: MIT + file LICENSE
  • Last published: 2024-12-01