Description Usage Arguments Details Value Author(s) Examples
A function to remove multiple button presses, i.e. data that has multiple values for the same threshold.
1 | Declutter(tmp, delta)
|
tmp |
a 'dark' object with at least two elements; tmp$time and tmp$thrs. |
delta |
The minimum time in seconds between responses. Thresholds set within two seconds of each other are discarded apart from the first threshold. |
In early data collected with analogue equipment it was psossible for a subject to return multiple button presses when setting just one threshold. This data is characterised by clusters of points within a very short time. This function removes the exptra presses. It is rarely need for data collected from digital equipment.
Returns an object with the same elements as 'tmp' but with object$time and object$thrs altered.
Jeremiah MF Kelly
Faculty of Life Sciences, The University of Manchester, M13 9PL, UK
1 2 3 4 5 6 7 8 9 | set.seed(123)
Time <-c(0, 0.02, 1, 2, 3, 3.02, 5, 6, 6.02, 7, 9, 9.02, 11,
12, 12.02, 13, 15, 15.02, 16, 18, 18.02, 20)
# with duplicated times
set.seed(1234)
tmp <- TestData(Time, sse=0.05)
## Not run: plot(tmp$time, tmp$thrs, ylim=c(-4,0))
tmp <- Declutter(tmp)
## Not run: points(tmp$time, tmp$thrs, col='red', pch=16)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.