Sets or updates metadata for an aniframe object. Metadata can be provided either as named arguments or as a list. If the aniframe already has metadata, the new values will be merged with existing values, with new values taking precedence.
Character values for factor fields will be automatically converted to factors if they match allowed levels.
Default metadata fields include:
source: Data source identifiersource_version: Version of the data sourcefilename: Original filenamesampling_rate: Sampling rate in Hzstart_datetime: Start date and time of recordingreference_frame: Reference frame (default: "allocentric")coordinate_system: Coordinate system (default: "cartesian")point_of_reference: Point of reference (default: "bottom_left")
Examples
if (FALSE) { # \dontrun{
# Set metadata using named arguments
data <- set_metadata(data, sampling_rate = 30, source = "sleap")
# Set metadata using a list
md <- list(sampling_rate = 30, source = "sleap")
data <- set_metadata(data, metadata = md)
} # }