diff --git a/docs/news/index.html b/docs/news/index.html index c4028f2..4c98612 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -85,9 +85,9 @@

Change log All releases

mousetrap 3.0.0

-
+

- General announcements

+ Announcements
  • We are delighted that Dirk Wulff and Jonas Haslbeck have joined the mousetrap team! They are contributing a number of new functions, particularly for clustering and visualization.
  • The documentation of the mousetrap package can now also be found online at http://pascalkieslich.github.io/mousetrap/ @@ -101,7 +101,7 @@

  • Introduction of class mousetrap for mousetrap data objects (such as mt_example). This facilitates, among other things, checking of the data class.
  • Change of dimension order for all trajectory arrays: The old order was 1) trials, 2) variables, 3) samples. The new order is 1) trials, 2) samples, 3) variables. All functions and example data have been modified accordingly.
  • Many reshape, aggregation, export, and plotting functions now accept a trajectory array as direct input to data.
  • -
  • In case an analysis functions adds measures to an existing data.frame, existing columns of the same name are now replaced and a warning is displayed (instead of merging the data.frames and adding generic suffixes).
  • +
  • In case an analysis function adds measures to an existing data.frame, existing columns of the same name are now replaced and a warning is displayed (instead of merging the data.frames and adding generic suffixes).
  • Arguments that were already deprecated and replaced (e.g., show_progress was replaced with verbose) have been removed.
@@ -110,19 +110,19 @@

Changes in specific functions

@@ -176,8 +176,7 @@

  • mt_movement_angle: removed as it is replaced with new and more general function mt_angles.
  • -mt_calculate_derivatives, mt_calculate_deviations, mt_calculate_measures: removed as they were previously deprecated and replaced with mt_derivatives, mt_deviations, mt_measures -
  • +mt_calculate_derivatives, mt_calculate_deviations, mt_calculate_measures: removed as they were previously deprecated and replaced with mt_derivatives, mt_deviations, mt_measures.

    diff --git a/docs/reference/mousetrap.html b/docs/reference/mousetrap.html index 5cb2e42..6649b35 100644 --- a/docs/reference/mousetrap.html +++ b/docs/reference/mousetrap.html @@ -110,7 +110,7 @@

    mt_align is a general purpose function for aligning and rescaling trajectories. For specific operations, you can rely on one of the - following specific functions.

    + following functions.

    mt_align_start aligns the start position of trajectories.

    mt_align_start_end aligns all trajectories so that they share a common initial and final coordinate (this is also sometimes referred to as diff --git a/docs/reference/mt_align.html b/docs/reference/mt_align.html index cbb79a8..c3e5c12 100644 --- a/docs/reference/mt_align.html +++ b/docs/reference/mt_align.html @@ -114,7 +114,7 @@

    Ar and dim2, mt to set coordinates to c(0,0,-1,1.5), norm to set coordinates to c(0,0,-1,1), and wide to set coordinates to c(0,0,-1,1.2). In the three-dimensional case, -coordinates is a vector of length 6. +coordinates is a vector of length 6.
    align_start
    boolean specifying whether the start points of all trajectories should be aligned to the position specified in @@ -145,17 +145,14 @@

    Value

    Details

    If align_start / align_end is FALSE, coordinates -define the position of the average start / end point across all trajectories. -Note that if both align_start and align_end are FALSE -(the default), this completely preserves the relative location of all -trajectory points.

    +define the position of the average start / end point across all trajectories.

    +

    Note that if the end points of trajectories are not aligned, coordinates +refer to the hypothetical case where all trajectories are mapped to one side.

    If align_start / align_end is TRUE, the start / end point of each trajectory is set to the exact position specified in coordinates. align_start and align_end can be set completely independently of one another, i.e., one can align only end points, only start points, none, or both.

    -

    Note that if the end points of trajectories are not aligned, coordinates -refer to the hypothetical case where all trajectories are mapped to one side.

    If align_start is set to "left" or "right" trajectories will be flipped to the lower or upper spectrum of the first dimensions, respectively. If the first dimension is the x-coordinate this is equivalent diff --git a/docs/reference/mt_align_start.html b/docs/reference/mt_align_start.html index c5958fa..2f5d689 100644 --- a/docs/reference/mt_align_start.html +++ b/docs/reference/mt_align_start.html @@ -124,6 +124,8 @@

    See a

    mt_align_start_end for aligning the start and end position of trajectories.

    +

    mt_align as a general purpose function for aligning and rescaling + trajectories.

    mt_remap_symmetric for remapping trajectories.

    diff --git a/docs/reference/mt_align_start_end.html b/docs/reference/mt_align_start_end.html index eb4166b..9454ac8 100644 --- a/docs/reference/mt_align_start_end.html +++ b/docs/reference/mt_align_start_end.html @@ -139,6 +139,8 @@

    R

    See also

    mt_align_start for aligning the start position of + trajectories.

    +

    mt_align as a general purpose function for aligning and rescaling trajectories.

    mt_remap_symmetric for remapping trajectories.

    diff --git a/docs/reference/mt_angles.html b/docs/reference/mt_angles.html index 5d966a4..cf86d9d 100644 --- a/docs/reference/mt_angles.html +++ b/docs/reference/mt_angles.html @@ -129,7 +129,7 @@

    Details

    By default, angles are reported in radians, the alternative is degrees. For the first point in a trajectory, the angle values are always not defined -(NA)

    +(NA).

    For vertical-based angles (angle_v), positive values indicate a movement to the left of the vertical, negative values to the right of the vertical. If there was no movement across two consecutive points, diff --git a/docs/reference/mt_bind.html b/docs/reference/mt_bind.html index 61c4db2..8925940 100644 --- a/docs/reference/mt_bind.html +++ b/docs/reference/mt_bind.html @@ -105,13 +105,10 @@

    Value

    Examples

    -
    -## Not run: ------------------------------------ -# trajectories_combined <- mt_bind( -# mt_example$trajectories, -# mt_prototypes -# ) -## ---------------------------------------------
    +
    trajectories_combined <- mt_bind( + mt_example$trajectories, + mt_prototypes +)
    -

    An exemplary mouse-tracking dataset collected in OpenSesame using the -mousetrap plug-ins. A preprocessed (as opposed to raw) version of the same -data can be found in mt_example.

    +

    An exemplary mouse-tracking dataset collected in OpenSesame using the +mousetrap plugin (Kieslich & Henninger, 2017). A preprocessed (as opposed to +raw) version of the same data can be found in mt_example.

    mt_example_raw
    @@ -133,7 +133,8 @@

    R

    Dale, R., Kehoe, C., & Spivey, M. J. (2007). Graded motor responses in the time course of categorizing atypical exemplars. Memory & Cognition, 35(1), 15-28.

    -

    Mousetrap

    +

    Kieslich, P. J., & Henninger, F. (2017). Mousetrap: An integrated, + open-source mouse-tracking package. Manuscript submitted for publication.

    diff --git a/docs/reference/mt_import_mousetrap.html b/docs/reference/mt_import_mousetrap.html index d5609b6..7091884 100644 --- a/docs/reference/mt_import_mousetrap.html +++ b/docs/reference/mt_import_mousetrap.html @@ -82,14 +82,14 @@

    Import mouse-tracking data recorded using the mousetrap plug-ins in OpenSesa

    mt_import_mousetrap accepts a data.frame of (merged) raw data from a -mouse-tracking experiment implemented in OpenSesame using the mousetrap -plugin. From this data.frame, mt_import_mousetrap creates a mousetrap -data object containing the trajectories and additional data for further -processing within the mousetrap package. Specifically, it returns a list that -includes the trajectory data as an array (called trajectories), and -all other data as a data.frame (called data). This data structure can -then be passed on to other functions within this package (see -mousetrap for an overview).

    +mouse-tracking experiment implemented in OpenSesame using the mousetrap +plugin (Kieslich & Henninger, 2017). From this data.frame, +mt_import_mousetrap creates a mousetrap data object containing the +trajectories and additional data for further processing within the mousetrap +package. Specifically, it returns a list that includes the trajectory data as +an array (called trajectories), and all other data as a data.frame +(called data). This data structure can then be passed on to other +functions within this package (see mousetrap for an overview).

    mt_import_mousetrap(raw_data, xpos_label = "xpos", ypos_label = "ypos",
    @@ -174,8 +174,11 @@ 

    Details

    References

    -

    Mousetrap plugin for OpenSesame - (https://github.com/pascalkieslich/mousetrap-os)

    +

    Kieslich, P. J., & Henninger, F. (2016). Mousetrap: + Mouse-tracking plugins for OpenSesame (Version 1.2.1). doi: + https://doi.org/10.5281/zenodo.163404

    +

    Kieslich, P. J., & Henninger, F. (2017). Mousetrap: An integrated, + open-source mouse-tracking package. Manuscript submitted for publication.

    See also

    diff --git a/docs/reference/mt_import_wide.html b/docs/reference/mt_import_wide.html index 7845903..21c0a8c 100644 --- a/docs/reference/mt_import_wide.html +++ b/docs/reference/mt_import_wide.html @@ -81,18 +81,17 @@

    Import mouse-tracking data saved in wide format.

    -

    mt_import_wide receives a data.frame where mouse-tracking data are +

    mt_import_wide receives a data.frame where mouse-tracking data are stored in wide format, i.e., where one row contains the data of one trial and -every recorded mouse position and variable is saved in a separate variable -(e.g., X_1, X_2, ..., Y_1, Y_2, ...). This is, e.g., the case when exporting -trajectories from MouseTracker (Freeman & Ambady, 2010). From this -data.frame, mt_import_wide creates a mousetrap data object containing -the trajectories and additional data for further processing within the -mousetrap package. Specifically, it returns a list that includes the -trajectory data as an array (called trajectories), and all other data -as a data.frame (called data). This data structure can then be passed -on to other functions within this package (see mousetrap for an -overview).

    +every recorded mouse position and variable is saved in a separate variable +(e.g., X_1, X_2, ..., Y_1, Y_2, ...). This is, e.g., the case when collecting +data using MouseTracker (Freeman & Ambady, 2010). From this data.frame, +mt_import_wide creates a mousetrap data object containing the +trajectories and additional data for further processing within the mousetrap +package. Specifically, it returns a list that includes the trajectory data as +an array (called trajectories), and all other data as a data.frame +(called data). This data structure can then be passed on to other +functions within this package (see mousetrap for an overview).

    mt_import_wide(raw_data, xpos_label = "X", ypos_label = "Y",
    @@ -153,17 +152,14 @@ 

    Value

    Details

    -

    mt_import_wide is designed to import mouse-tracking data saved in a -wide format. The defaults are set so that usually only the raw_data -and pos_ids need to be provided when importing trajectory data that -stem from a "time normalized analysis" in MouseTracker (Freeman & Ambady, -2010).

    -

    If no pos_ids are provided, column labels for the respective variable -(e.g., x-positions) are extracted using grep returning all -variables that start with the respective character string (e.g., "X_" if -xpos_label="X" and pos_sep="_"). This is, e.g., useful when -importing trajectory data that stem from a "raw time analysis" in -MouseTracker (Freeman & Ambady, 2010).

    +

    mt_import_wide is designed to import mouse-tracking data saved in a +wide format. The defaults are set so that usually only the raw_data +need to be provided when data have been collecting using MouseTracker +(Freeman & Ambady, 2010) and have been read into R using read_mt.

    +

    If no pos_ids are provided, column labels for the respective variable +(e.g., x-positions) are extracted using grep returning all +variables that start with the respective character string (e.g., "X_" if +xpos_label="X" and pos_sep="_").

    If no timestamps are found in the data, mt_import_wide automatically creates a timestamps variable with increasing integers (starting with 0) assuming equally spaced sampling intervals.

    @@ -176,6 +172,9 @@

    R

    See also

    +

    read_mt for reading raw data that was collected using + MouseTracker (Freeman & Ambady, 2010) and stored as a file in the ".mt" + format.

    mt_import_mousetrap and mt_import_long for importing mouse-tracking data in other formats.

    diff --git a/docs/reference/mt_measures.html b/docs/reference/mt_measures.html index dd94e6e..efe88d7 100644 --- a/docs/reference/mt_measures.html +++ b/docs/reference/mt_measures.html @@ -191,7 +191,10 @@

    Details

    References

    -

    Mousetrap

    +

    Kieslich, P. J., Wulff, D. U., Henninger, F., Haslbeck, J. M. B., + & Schulte-Mecklenbeck, M. (2017). Analyzing mouse- and hand-tracking data: + Methodological considerations and an open-source implementation. Manuscript + in preparation.

    Freeman, J. B., & Ambady, N. (2010). MouseTracker: Software for studying real-time mental processing using a computer mouse-tracking method. Behavior Research Methods, 42(1), 226-241.

    diff --git a/docs/reference/mt_prototypes.html b/docs/reference/mt_prototypes.html index 3ad3a7c..e9dfe86 100644 --- a/docs/reference/mt_prototypes.html +++ b/docs/reference/mt_prototypes.html @@ -107,8 +107,8 @@

    Details

    References

    -

    Wulff, D. U., Haslbeck, J. M. B., Schulte-Mecklenbeck, M. (2017). Measuring the -(dis-)continuous mind. Manuscript in preparation.

    +

    Wulff, D. U., Haslbeck, J. M. B., Schulte-Mecklenbeck, M. (2017). + Measuring the (dis-)continuous mind. Manuscript in preparation.

    diff --git a/docs/reference/mt_spatialize.html b/docs/reference/mt_spatialize.html index 4b90222..d35e405 100644 --- a/docs/reference/mt_spatialize.html +++ b/docs/reference/mt_spatialize.html @@ -108,7 +108,7 @@

    Ar
    an integer or vector of integers specifying the number of points used to represent the spatially rescaled trajectories. If a single integer is provided, the number of points will be constant across -trajectories. Alternatively, a vector if integers can provided that specify +trajectories. Alternatively, a vector of integers can provided that specify the number of points for each trajectory individually.
    @@ -122,12 +122,11 @@

    Value

    Details

    mt_spatialize is used to emphasize the trajectories' shape. Usually, -the vast majority of points of a time-normalized raw or a time-normalized -trajectory lie close to the start and end point. mt_spatialize -re-distributes these points so that the spatial distribution is uniform -across the entire trajectory. mt_spatialize is mainly used to improve -the results of clustering (in particular mt_cluster) and -visualization.

    +the vast majority of points of a raw or a time-normalized trajectory lie +close to the start and end point. mt_spatialize re-distributes these +points so that the spatial distribution is uniform across the entire +trajectory. mt_spatialize is mainly used to improve the results of +clustering (in particular mt_cluster) and visualization.

    Examples

    diff --git a/docs/reference/read_mt.html b/docs/reference/read_mt.html index 2ac3275..930d28c 100644 --- a/docs/reference/read_mt.html +++ b/docs/reference/read_mt.html @@ -84,11 +84,11 @@

    Read MouseTracker raw data.

    read_mt reads raw data that was collected using MouseTracker (Freeman & Ambady, 2010) and stored as a file in the ".mt" format. If multiple files should be read into R, read_mt can be used in combination with the -read_bulk functon from the readbulk package (see +read_bulk function from the readbulk package (see Examples). After reading the data into R, mt_import_wide can be used to prepare the trajectory data for analyses using the mousetrap library. The current version of read_mt has been tested with data from MouseTracker -Version 2.84 but please be sure to double-check.

    +Version 2.84 - but please be sure to double-check.

    read_mt(file, columns = "all", add_trialid = FALSE, add_filename = FALSE)
    @@ -99,7 +99,7 @@

    Ar
    a character string specifying the filename of the .mt file.
    columns
    either 'all' or a character vector specifying the to be -extracted variables Defaults to 'all' in which case all existing variables +extracted variables. Defaults to 'all' in which case all existing variables will be extracted.
    add_trialid
    boolean specifying whether an additional column containing @@ -111,8 +111,8 @@

    Ar

    Value

    -

    A data frame with one row per trial. Variables are ordered according - to columns, x-coordinates, y-coordinates, and timestamps.

    +

    A data.frame with one row per trial. Variables are ordered + according to columns, x-coordinates, y-coordinates, and timestamps.

    References

    @@ -130,6 +130,7 @@

    See a

    Examples

    ## Not run: ------------------------------------ # # Read a single raw data file from MouseTracker +# # (stored in the current working directory) # mt_data_raw <- read_mt("example.mt") # # # Use read_bulk to read all raw data files ending with ".mt" that are