num_cols <- unlist(lapply(data, is.numeric)) # Identify numeric columns
data_num <- data[ , num_cols] #Only select those numeric colmns
data_num_nonan <−na.omit(data_num)
#How to find the number of nan is each column in R
is.na(data_num)
colSums(is.na(data_num))
which(colSums(is.na(data_num))>0)
names(which(colSums(is.na(data_num))>0))