defaultList: Add Default Elements to Incomplete list

Description Usage Arguments Value Author(s) See Also Examples

Description

Given two lists elemets (by name) missing from the first are copied from the second list (if present). Is used to create default lists, ensuring that all elements expected in the list are present with reasonable values (if not user specified).

Usage

1

Arguments

x

A list

prototype

A list with named elements, any elements missing from x are replaced with corresponding elements from prototype.

Value

Updated version of x

Author(s)

Johan Lindstrom

See Also

Other utility functions: convertCharToDate

Examples

1
 defaultList(list(a=1,b=4), list(a=3,c="a",d=4))

SpatioTemporal documentation built on May 2, 2019, 8:49 a.m.