Learn R Programming

Dark (version 0.9.4)

GetData: GetData

Description

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.

Usage

GetData(path, .....)

Arguments

path
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.

Value

  • A dark object with at least two elements
  • timethe time elapsed after measurements begin in minutes
  • thrsthe thresholds recorded in log units
  • other possible values include
  • datathe name of the data source
  • initinitial estimates of the optimal model parameters
  • optoptimal estimates of the optimal model parameters
  • residthe residuals of the data for an optimal model
  • ...others to be added

Details

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.

See Also

TestData

Examples

Run this code
set.seed(1234)
tmp <- GetData()

Run the code above in your browser using DataLab