data <- data[complete.cases(data[,5:6]),]#删除第五六列有空值的行
data <- na.omit(data)#删除有空值的行
转载于:https://www.cnblogs.com/shilo930/p/11057331.html