find pattern in name's dataset

find_name(dataset, pattern)

Arguments

dataset

a data.frame (or list or anything with names parameter)

pattern

pattern we are looking for

Value

a list with position and value

Examples


find_name(iris,"Sepal")
#> $rang
#> [1] 1 2
#> 
#> $valeur
#> [1] "Sepal.Length" "Sepal.Width" 
#>