Returns the indices of numeric and categorical variables in the dataset

find_fruits_veg(df, type_of_out = "categ")

Arguments

df

An input dataframe

type_of_out

A character that indicates the wanted type (numeric/ categorical) of data

Value

A vector of indices of wanted data type (numeric/ categorical)

Examples

find_fruits_veg(iris, 'num')
#> [1] 1 2 3 4