The attr(,"config") always points to the name requested, regardless of inheritance or use of the "default" value. If inherited, then there is the $inherits value in the list, but if the name is not found then the default entry is returned with no indication that it is being used.
Short of using names(yaml::yaml.load_file("...")), is there a way to determine if the named account is not present?
(I realize having the default value is important, and that one intent is for it to always return something if the file is present and the file is structured correctly with at least a default: entry. I'm not suggesting changing that.)
The
attr(,"config")
always points to thename
requested, regardless of inheritance or use of the "default" value. If inherited, then there is the$inherits
value in the list, but if the name is not found then the default entry is returned with no indication that it is being used.Short of using
names(yaml::yaml.load_file("..."))
, is there a way to determine if the named account is not present?Perhaps something like
attr(,"defaultused") <- TRUE
could be a simple start. An extreme solution might provide a vector of inherited names:(I realize having the default value is important, and that one intent is for it to always return something if the file is present and the file is structured correctly with at least a
default:
entry. I'm not suggesting changing that.)