I hereby claim:
- I am jessieserrino on github.
- I am serrino (https://keybase.io/serrino) on keybase.
- I have a public key ASAnwctys9SDmeHpNkjh9ay48ncJ3uIENuNj0H-z2obSugo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
fixNAs <- function(data_frame){ | |
integer_reac <- 0 | |
factor_reac <- "Other" | |
character_reac<-"Other" | |
for (i in 1 : ncol(data_frame)){ | |
if (class(data_frame[,i]) %in% c("numeric","integer")) { | |
if (any(is.na(data_frame[,i]))){ | |
# sets numeric values to the median value of the dataset | |
data_frame[is.na(data_frame[,i]),i] <- median(data_frame[,i], na.rm = TRUE) |
I hereby claim:
To claim this, I am signing this object: