I am new to R. I am good with python. In python we have a function select_dtypes(df,include='datatype', exclude='datatype')
So if I want to find out all numeric columns, I can do select_dtype(df,include='numeric')
and I get list of numeric columns only. This will select all columns which are numeric(float, int32, int64 etc.) . I can also explicitly select only int columns and so on. Similarly I can also exclude columns of a particular datatype
How do I achieve the same in R.
df
Int1 Int2 Char1 Char2 factor1 flaot1 #lets say these are the columns of a df