Learn R Programming

mousetrap (version 1.2.0)

mt_id: Trial identifier for mousetrap data.

Description

A character string specifying the name of the column containing the ID of every trial. By default, this label is called mt_id. This ID is generated when importing data using one of the mt_import functions (e.g., mt_import_mousetrap). Every data.frame that is added to a mousetrap data object (see mt_example) contains a column of that name. In every trajectory array, the first dimension corresponding to the different trials has the respective label of the trial as name. Using the mt_id variable, data from different data.frames or arrays can be merged easily. Please note that it is currently not possible to change the default value.

Usage

mt_id

Arguments

Format

An object of class character of length 1.

Examples

Run this code
# the default value
mt_id <- "mt_id"

# Calculate mouse-tracking measures
mt_example <- mt_calculate_measures(mt_example)

# Merge measures with trial data (adding "_raw"
# to columns already existing in the trial data)
mt_example_results <- merge(
  mt_example$data, mt_example$measures,
  by="mt_id",suffixes=c("_raw",""))

Run the code above in your browser using DataLab