试图解决错误,但找不到解决方案。
# missing observations
loan_data$mths_since_last_delinq[is.na(loan_data$mths_since_last_delinq)] <- 0
loan_data$mths_since_last_record[is.na(loan_data$mths_since_last_record)] <- 0
var.has.na <- lapply(loan_data, function(x){any(is.na(x))})
num_na <- which( var.has.na == TRUE )
loan_data <- loan_data[complete.cases(loan_data),]
skim(loan_data)
.f(.x [[i]],...)中的错误:length(x)> 0不正确