whoami: Input Identification

View source: R/whoami.R

whoamiR Documentation

Input Identification

Description

Helper that identifies input arguments thanks to their IFC classes even if they are not or mis named.

Usage

whoami(
  entries = as.list(match.call()),
  search = list(info = "IFC_info", param = "IFC_param", offsets = "IFC_offset"),
  reinit = TRUE
)

Arguments

entries

arguments from the function whoami is called. /!\ whoami MUST be called explicitly this way: whoami(entries = as.list(match.call())).

search

a non duplicated named list of classes to search for entries.

reinit

whether to reinitialize arguments to their default values in called environment. Default is TRUE.

Details

if two argument of the same 'search' class are found an error will be thrown. 'fileName' will be searched every time.
-at first, as an argument (named or not) of the class designated in 'search' to be the "fileName",
-otherwise, as an argument (named or not) of class 'fileName',
-otherwise, as a named argument of name "fileName" that was not found using 'search',
-and finally, if still not found as the first not named argument not found in 'search' of type string.

Value

a list whose members are 'fileName': value of fileName if provided as a named argument in entries and all classes defined in 'search'


IFC documentation built on Sept. 14, 2023, 1:08 a.m.