na_replace: Replaces NA in a data.table

Description Usage Arguments Value Examples

Description

This function will replace NAs in the data.table with the value of your choice.

Usage

1
na_replace(DT, value)

Arguments

DT

A data.table object.

value

A length-one numeric, character or factor vector indicating which value you want to use to replace NAs in your data.table.

Value

The data.table without NAs.

Examples

1
2
3
## You want to replace all you NAs by 0

DT <- na_replace(DT,0)

guillaumelf/BarchenPackage documentation built on May 31, 2019, 11:50 p.m.