defaultList {SpatioTemporal} | R Documentation

## Add Default Elements to Incomplete list

### 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

    defaultList(x, prototype = list())

### 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

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

[Package SpatioTemporal version 1.1.9.1 Index]