Create a gadgetstock object, from fresh or an existing file

gadgetstock(stock_name, path, missingOkay = FALSE)

Arguments

stock_name

The name of the stock, as

path

The path to the gadget directory to read from

missingOkay

If TRUE, return an empty gadgetstock object if file does not exist.

Value

A list of lists representing the gadget stock file

Examples

if (FALSE) {
path <- './cod-model'
# Read codmat from './cod-model', throw an error if it doesn't exist
gadgetstock('codmat', path, missingOkay = TRUE)  
# Read codimm stock / create a new one
gadgetstock('codimm', path, missingOkay = TRUE)  
}