I am trying fill the NA values in the Age column with the mean value of Ages based on Sex in R

后端 未结 0 337
谎友^
谎友^ 2020-12-15 12:27
impute.age <- function(age, sex){
  corrected.age <- age
  if(is.na(age) & sex == 1){
    corrected.age <- male.mean.age
  }else if(is.na(age) & sex         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题