Skip to contents

Returns a list containing the default metadata fields and their initial values. The same metadata substrate is shared by both aniframe() and anievent() objects; per-class data contracts are versioned via spec_version. Most fields are initialized as NA and should be set appropriately for your data.

Usage

default_metadata()

Value

A named list with the following fields:

  • source: Data source identifier (character, NA)

  • source_version: Version of the data source (character, NA)

  • filename: Original filename(s) (character vector, NA). Accepts a vector of length 1 or more — readers that load from multiple files (e.g. aniread::read_trackball()) populate this with all source paths.

  • sampling_rate: Sampling rate in Hz (numeric, NA)

  • start_datetime: Start date and time of recording (POSIXct, NA)

  • reference_frame: Reference frame (factor, "allocentric")

  • coordinate_system: Coordinate system (factor, "cartesian")

  • origin: Location of the (0,0) coordinate relative to the recording frame (factor, "bottom_left"). Permitted values: "bottom_left", "top_left".

  • y_height: Height of the recording frame in y-axis units (numeric, NA). Used by set_origin() to reflect y coordinates when switching origin conventions.

  • connections: Named list of connection tables, one per identity or temporal variable (typically keypoint for skeletons; could also be individual for social networks). Each entry is a 2-column tibble of from/to pairs. Default is an empty list. Manage via set_connections(), get_connections(), add_connections() and remove_connections().

  • variables_event: Named list with two entries, state and point, each a character vector naming columns that carry per-frame categorical event labels. state columns are interval-valued (durative behaviours, ordered coarse to fine to encode nesting); point columns are instantaneous (zero-duration events). Foundation for the anievent class and downstream event-handling utilities. Default is an empty list for each.

  • spec_version: Named list of semantic version strings, one per class in the animovement ecosystem (currently aniframe and anievent). Versions the full data contract of each class (mandatory columns, validator, and the metadata fields the class uses), independently of the package version. Objects serialised before this field existed are tolerated by the metadata validator; new objects always get it.