NA.cero | R Documentation |
Sustituir todos los NA por ceros.
NA.cero(x)
x |
Vector o columna |
Na por cualquier valor en un vector o columna.
#Introducimos NAs aleatorios en el dataframe
iris$Sepal.Length[c(1,3,5,7,9)] <- NA
head(iris)
#ahora sustituimos por ceros
iris.sinNA<- as.data.frame(lapply(iris,NA.cero))
head(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.