
Last chance! 50% off unlimited learning
Sale ends in
findvar_fun(df, ...)
findvar_in_df(pattern, df, ...)
findvar_anywhere(pattern, envir = .GlobalEnv, ...)
grep
findvar_fun
: A function with argument param
to search for param
in df
. See example!
findvar_in_df
: A vector with variable names from df matching the pattern.
findvar_anywhere
: Does not return anything but prints a message where variables matching the pattern can be found.
find_cars <- findvar_fun(cars)
find_cars("sp")
findvar_in_df("sp", cars)
cars <- cars; iris <- iris
findvar_anywhere("petal")
Run the code above in your browser using DataLab