replace_na_with: Replace NA

View source: R/tools.R

replace_na_withR Documentation

Replace NA

Description

Replace NA values of a variable in a dataframe

Usage

replace_na_with(data, var_name, with)

Arguments

data

A dataframe

var_name

Name of variable where NAs are replaced

with

Value instead of NA

Value

Updated dataframe

Examples

data <- data.frame(nr = c(1,2,3,NA,NA))
replace_na_with(data, "nr", 0)

rolkra/explore documentation built on April 17, 2024, 10:58 p.m.