## Replace items with matching names recursively
x = list(a=1, b=2, c=list(a=31, b=32), 135)
val = list(a=2, c=list(b=1114), d=92)
modifyExistingList(x, val)
## Same defaults for rows/columns, no arguments specified
defs = list(a="A", b="B", c="C")
extractArg(NULL, defs)
## Shared and non-shared defaults
defs = list(common.1=134, common.2=72, Row=list(row.only=14), Col=list(col.only=134))
args = list(common.1 = -1, Row=list(row.only=94, common.2=-15))
extractArg(args, defs)
Run the code above in your browser using DataLab