(see in R notebook)
mhealth
named list stores constants in a hierarchical structure. You can run str(mhealth)
to display them compactly.
Use mhealth$filetype
sub list to query available file types which are often required for other mhealth
functions.
List of 8
$ sensor : chr "sensor"
$ annotation: chr "annotation"
$ event : chr "event"
$ feature : chr "feature"
$ log : chr "log"
$ note : chr "note"
$ class : chr "class"
$ stat : chr "stat"
As an example,
# validate sensor file
mhealth.validate(filename, mhealth$filetype$sensor)
Use mhealth$format
sub list to query datetime and other format for mhealth specification.
List of 2
$ filename:List of 1
..$ TIMESTAMP: chr "%Y-%m-%d-%H-%M-%OS"
$ csv :List of 1
..$ TIMESTAMP: chr "%Y-%m-%d %H:%M:%OS"
Use mhealth$example
sub list to examples of filenames or csv files for mhealth specification.
mhealth$example$filename
)List of 4
$ sensor : chr "SensorType-DataType.SENSORID-DATATYPE-VERSIONCODE.YYYY-MM-DD-HH-mm-ss-SSS-[M/P]HHmm.sensor.csv(.gz)"
$ feature : chr "FeatureType.FEATUREID-VERSIONCODE.YYYY-MM-DD-HH-mm-ss-SSS-[M/P]HHmm.feature.csv[.gz]"
$ event : chr "SensorType-EventType.SENSORID-EVENTTYPE-VERSIONCODE.YYYY-MM-DD-HH-mm-ss-SSS-[M/P]HHmm.event.csv"
$ annotation: chr "AnnotationSet.ANNOTATIONSETID-ANNOTATORID-VERSIONCODE.YYYY-MM-DD-HH-mm-ss-SSS-[M/P]HHmm.annotation.csv"