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 @@
mousetrap
team! They are contributing a number of new functions, particularly for clustering and visualization.mousetrap
package can now also be found online at http://pascalkieslich.github.io/mousetrap/
@@ -101,7 +101,7 @@ mousetrap
for mousetrap data objects (such as mt_example
). This facilitates, among other things, checking of the data class.data
.show_progress
was replaced with verbose
) have been removed.mt_align_start
: function is now vectorized and allows for optionally aligning to mean start position across trials; default for save_as
argument set to use
.mt_align_start
: function is now vectorized and allows for optionally aligning to mean start position across trials; default for save_as
argument is set to use
.
mt_space_normalize
: function is deprecated and replaced with mt_align_start_end
. It offers similar functionality but is vectorized and allows for optionally aligning to mean start/end position across trials.mt_resample
: optionally perform partial constant interpolation. Thanks to @sbrockhaus for the suggestion.mt_resample
: now provides option to perform partial constant interpolation. Thanks to @sbrockhaus for the suggestion (cf. #7, #9).
mt_derivatives
: optionally return timestamp differences.mt_derivatives
: now provides option to additionally return timestamp differences.
mt_measures
: optionally determine number and duration of hovers.mt_measures
: now optionally determines the number and duration of hovers (cf. #9), improved documentation and report of time measures (cf. #6).
mt_plot
: introduced facet_row
and facet_col
arguments for faceting.mt_plot_add_rect
: internal change to avoid warning message (due to changes in ggplot).mt_plot_add_rect
: internal change to avoid warning message (due to changes in ggplot2
).
mt_plot_riverbed
: explicitly remove zero frequencies instead of relying on the alpha parameter.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
.
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 @@
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.
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.
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 @@
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 @@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 @@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 @@
+-## 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 @@ 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 @@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).
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 ++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
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 (calledtrajectories
), and all other data -as a data.frame (calleddata
). This data structure can then be passed -on to other functions within this package (see mousetrap for an -overview).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 (calledtrajectories
), and all other data as a data.frame +(calleddata
). 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 theraw_data
-andpos_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 usinggrep
returning all -variables that start with the respective character string (e.g., "X_" if -xpos_label="X"
andpos_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 theraw_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 usinggrep
returning all +variables that start with the respective character string (e.g., "X_" if +xpos_label="X"
andpos_sep="_"
).If no timestamps are found in the data,
@@ -176,6 +172,9 @@mt_import_wide
automatically creates a timestamps variable with increasing integers (starting with 0) assuming equally spaced sampling intervals.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
+the vast majority of points of a raw or a time-normalized trajectory lie +close to the start and end point.
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.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.
+Version 2.84 - but please be sure to double-check.
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 thereadbulk
package (see +read_bulk function from thereadbulk
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 ofread_mt
has been tested with data from MouseTracker -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