Search
 
SCRIPT & CODE EXAMPLE
 

C

how to select numeric columns in r

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))
Comment

PREVIOUS NEXT
Code Example
C :: how to change file permissions in C language 
C :: search sorted array c 
C :: powershell search big files 
C :: esp8266 wifi.config does not work 
C :: mediawiki upload size 
C :: fahrenheit to celcius 
C :: -42 c to f 
C :: C program to find power of any number 
C :: command args c 
C :: print 0 1 2 3 4 in c while loop 
C :: c command line arguments parser 
C :: passing pointer to function 
C :: logical operators 
C :: Install valet-linux 
C :: what is clrsce in C 
C :: address operator 
C :: Print mark-sheet of students 
C :: C static libraries (Indexing an archive) 
C :: convert c code to assembly language 
C :: rand in c 
C :: c enums 
C :: how to output in green in c 
C :: check if string is number c 
C :: suma de digitos 
C :: cut first part of string c 
C :: c michael 
C :: c Modulo 10^9+7 (1000000007) 
C :: fscanf stops at space 
C :: take array input from user and calc the avr in c 
C :: C do...while loop 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =