Writes tabular time-series data (joint angles, kinematics, ...) from a
PhysioExperiment to an OpenSim .mot file. This is the inverse of
readMOT(): a readMOT() -> writeMOT() -> readMOT() round-trip reproduces
every numeric column exactly and the derived sampling rate.
Details
The time column is taken from metadata(x)$time when present, otherwise it
is reconstructed from samplingRate(x). The inDegrees header flag is
preserved from metadata(x)$inDegrees (default "yes").
Examples
mot_file <- system.file("testdata", "sample.mot", package = "PhysioMoCap")
if (nzchar(mot_file)) {
pe <- readMOT(mot_file)
out <- tempfile(fileext = ".mot")
writeMOT(pe, out)
}