na_to_0 {forestmangr}R Documentation

Convert NA to zero on numeric variables

Description

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

Usage

na_to_0(df)

Arguments

df

A data frame

Value

a data frame

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

Examples

library(forestmangr)
data("exfm15")
head(exfm15)

# Raise a numeric vector to the power of 2:
pow(iris$Petal.Length, 2)

# Fit a model that contains the dbh squared, without the need to create a new variable:
exfm15 %>% na_to_0()


[Package forestmangr version 0.9.6 Index]