whoami: Input Identification

Description Usage Arguments Details Value

View source: R/whoami.R

Description

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

Usage

1
2
3
4
5
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 Jan. 13, 2021, 9:45 p.m.