get.bins: Get bins

Description Usage Arguments Value Examples

Description

A convenience function to transform raw data from MR-SAT expeiment to list that contain information about bins used and a long-format data frame with bins specified.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
get.bins(x, 
  rt_col = "rt[0-3][0-9]",
  res_col = "key[0-3][0-9]",
  window = c("fixed","free"),
  offset = TRUE, 
  sauce=FALSE, 
  endbin = 16, binsize = 350, 
  auditory = FALSE, audio.rt.base = 5006, 
  quiet = TRUE, 
  plot = FALSE, 
  add.two = FALSE,
  shift.edge = FALSE)

Arguments

x

a data frame. See 'Details'.

rt_col

Either a numeric vector specifying the colum position of columns in x representing the response time information, or a charactor string containing a regular expression to be matched in the column names of x.

res_col

Either a numeric vector specifying the colum position of columns in x representing the reponse accuracy information, or a charactor string containing a regular expression to be matched in the column names of x.

window

character. If fixed, a fixed window with size specified in binsize will be used for binning. If free, the window size will be determined based on the pattern in the data.

offset

logical. If TRUE, a initial period of no response will be assumed.

sauce

logical. Currently unknown what this is for but it's there for histrical reasons.

endbin

Numeric.

binsize

Numeric. The size of time bins in millisecond.

auditory

logical. If TRUE, reaction times in the x data frame will be adjusted based on the constrant values specified by audio.rt.base and the value speficied in the 'SentLength' column of x.

audio.rt.base

numeric.

quiet

logical. If FALSE and when the offset is not 'none', information regarding the parameters chosen for the offset will be printed.

plot

logical. If TRUE, a histram of the response data will be plotted along with the

add.two

logical. Setting this to TRUE make the results more compatible with the old codes. Only relevant when window="fixed". Default to FALSE.

shift.edge

logical. Setting this to TRUE make the results more compatible with the old codes by shiting the timing bins 100 ms forward. Default to FALSE.

Value

A list containing

bins

a data frame containing the information needed to calculate dprimes using get.dprime.

opt.bin

An output form opt.bins

Examples

1
2
3
4
5
data(Auditory_demo)
s01.bins <- get.bins(Auditory_demo, auditory = TRUE)

#this would provide a slightly different bins 
s01.bins.free <- get.bins(Auditory_demo, auditory = TRUE, window="free")

matsukik/mrsat documentation built on May 21, 2019, 12:57 p.m.