Writes 3D marker trajectories from a PhysioExperiment to an OpenSim .trc
file. This is the inverse of readTRC(): a
readTRC() -> writeTRC() -> readTRC() round-trip reproduces the marker
coordinates exactly and the DataRate header field.
Details
Marker labels, units (metadata(x)$Units, default "mm"), frame rate, and
the time column (metadata(x)$time, else derived from samplingRate(x))
are preserved on write.
Examples
trc_file <- system.file("testdata", "sample.trc", package = "PhysioMoCap")
if (nzchar(trc_file)) {
pe <- readTRC(trc_file)
out <- tempfile(fileext = ".trc")
writeTRC(pe, out)
}