View source: R/write_mot_sto.R
write_mot_sto | R Documentation |
This function writes a data frame to an OpenSim MOT or STO file with a specific header format.
write_mot_sto(data, name = "Coordinates", inDegrees = "no", filename)
data |
A data frame containing the data to be written. Each column represents a variable, where the first column should represent time.. |
name |
A character string specifying the name of the file. Default is "Coordinates". |
inDegrees |
A character string specifying whether the data is in degrees. Default is "no". Use "yes" for degrees. |
filename |
A character string specifying the name of the file to which the data should be written. Include the extension .mot or .sto for compatability with OpenSim. |
# Create a sample data frame
df <- data.frame(time = 1:10, value = sin(1:10))
# Write the data frame to a file named "example.mot"
write_mot_sto(df, name = "ExampleData", inDegrees = "no", filename = "example.mot")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.