I have a dataset and I need to plot histograms for all the continuous data which i know how to do, however I cant use a loop as there are categorical columns too, meaning histograms wont be created for them which will create an error. Is there a way to separate the continuous data from the categorical data? If worse comes to worst, I can just manually remove the categorical features however I would like to know if theres a way to do this automatically for future reference.
            Asked
            
        
        
            Active
            
        
            Viewed 499 times
        
    1 Answers
2
            
            
        You can use package "dplyr", and in the example below, you chose all columns with factor variables
data <- data %>% 
    select_if(is.factor)
 
    
    
        Martin Gal
        
- 16,640
- 5
- 21
- 39
 
    
    
        Bloxx
        
- 1,495
- 1
- 9
- 21
