# NOT RUN {
# generate random sample of cues on continuum of 1-10,
# with sep=1:
set.seed(123)
cues <- round(runif(20, min=0.5, max=10.5),1)
# Note that cues will be converted to rounded numbers
# as round.values=TRUE. With cue window of 3:
cueWindow(cues, n=3, max=10)
# step of 0.5 increases number of neighboring cues:
cueWindow(cues, n=3, max=10, step=.5)
# cue window of 5:
cueWindow(cues, n=5, max=10)
# asymmetrical window:
cueWindow(cues, n=c(2,1), max=10, step=.5)
# non-uniform weights:
cueWindow(cues, n=5, max=10, weights=c(1,2,3,2,1))
cueWindow(cues, n=2.5, max=10, step=.5, weights=c(1,2,3,2,1))
# left cues have stronger weights:
cueWindow(cues, n=5, max=10, weights=c(3,3,2,1,1))
# adjust weights, so that cue itself is not included:
cueWindow(cues, n=c(2,1), max=10, weights=c(1,1,0,1))
# premarking:
cueWindow(cues, n=2, max=10, weights=c(1,1,1), premark="stimulus")
# numeric output:
cueWindow(cues, n=2, max=10, weights=c(1,2,1), as.numeric=TRUE)
# }
Run the code above in your browser using DataLab