A function that identifies the input data file based on a control stream. The default is to look at the $DATA section of of the output control stream (or input control stream if file.mod argument is used). This can be partly or fully overruled by using the dir.data or file.data arguments.

NMextractDataFile(file, dir.data = NULL, file.mod, file.data = NULL)

Arguments

file

The input control stream or the list file.

dir.data

See NMscanInput. If used, only the file name mentioned in $DATA is used. dir.data will be used as the path, and the existence of the file in that directory is not checked.

file.mod

The input control stream. Default is to look for \"file\" with extension changed to .mod (PSN style). You can also supply the path to the file, or you can provide a function that translates the output file path to the input file path. The default behavior can be configured using NMdataConf. See dir.data too.

file.data

Specification of the data file path. When this is used, the control streams are not used at all.

Value

The path to the input data file.