User Tools

Site Tools


replace_nas_with_0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

replace_nas_with_0 [2015/12/16 13:28] (current)
vincenzo created
Line 1: Line 1:
 +<code c>
 +library(dplyr)
 +df <- df %>%
 +      mutate(colname = ifelse(is.na(colname),​0,​colname))
 +</​code>​
  
replace_nas_with_0.txt ยท Last modified: 2015/12/16 13:28 by vincenzo