A template function that gets the data from a file and converts it to a dark object for use by other scripts. The script can be modified to format the data. A dark object has time data in minutes and thresholds in log units. If the data have been collected in other units then the script should convert them.
The script defaults to returning data generated by TestData
.
GetData(path, .....)
A dark object with at least two elements
the time elapsed after measurements begin in minutes
the thresholds recorded in log units
other possible values include
the name of the data source
initial estimates of the optimal model parameters
optimal estimates of the optimal model parameters
the residuals of the data for an optimal model
others to be added
This is the location of the data and will usually be a file path string.
This can be any other values that might be needed to identify the data, e.g. subject number or study reference.
Jeremiah MF Kelly
Mumac Ltd, SK7 6NR, GB
This script can be altered in any way desired and then saved with a different name. I suggest the format `GetData....R`, where the ellipsis describes the data in some way.
TestData
set.seed(1234)
tmp <- GetData()
Run the code above in your browser using DataLab