is_function_here
is_function_here.Rmd
library(saferDev)
Datasets info
f # Character vector of function name
> [1] "ggplot2::geom_point"
path # character vector specifying the absolute pathways of the directories, this lib_path will return an error
> [1] "blablabla"
Argument safer_check
is_function_here(
fun = f,
safer_check = TRUE
) # check if the package is in the computer, safer_check = TRUE, checkings are performed before main code running
Argument lib_path and error_text
is_function_here(
fun = f,
lib_path = ".", # absolute pathways of the directories containing the required packages if not in the default directories.
error_text = "TEXT ADDED" # add information in error messages returned by the function.
)
> Error:
>
> ================
>
> ERROR IN saferDev:::.pack_and_function_check() INSIDE saferDev::is_function_here()TEXT ADDED
>
> REQUIRED PACKAGE:
> saferDev
> MUST BE INSTALLED IN ONE OF THESE FOLDERS:
> /__w/saferDev/saferDev/vignettes/articles
> /usr/local/lib/R/site-library
> /usr/local/lib/R/library
>
> ================
All the arguments
is_function_here(
fun = f,
safer_check = TRUE, # perform some "safer" checks? Warning : always set this argument to FALSE if all_args_here() is used inside another safer function.
lib_path = NULL, # absolute pathways of the directories containing the required packages if not in the default directories.
error_text = "" # add information in error messages returned by the function.
) # check if the function is present in the package, returns an error because the path doesn't exist