Returns the indices of numeric and categorical variables in the dataset
find_fruits_veg(df, type_of_out = "categ")
df | An input dataframe |
---|---|
type_of_out | A character that indicates the wanted type (numeric/ categorical) of data |
A vector of indices of wanted data type (numeric/ categorical)
find_fruits_veg(iris, 'num')#> [1] 1 2 3 4