# NOT RUN {
# load example data:
data(dat)
# setup data:
newdat <- data.frame(Cues =paste("BG", dat$Shape, dat$Color, sep="_"),
Outcomes = dat$Category,
Frequency = dat$Frequency2)
train <- createTrainingData(newdat)
# learning:
wm <- RWlearning(train)
# calculate activations for all outcomes:
mat <- getWM(wm)
activationsMatrix(mat, cues="BG_tree_green")
# only accepts one set of cues - in this case all cues
# are combined:
activationsMatrix(mat, cues=c("BG_tree", "BG_tree_brown"))
# ... which is the same as this:
activationsMatrix(mat, cues=c("BG", "BG", "tree", "tree", "brown"))
# now select one outcome:
activationsMatrix(mat, cues=c("BG", "tree"), select.outcomes="vehicle")
# cues/outcomes not in matrix:
activationsMatrix(mat, cues=c("na"), select.outcomes="new")
# }
Run the code above in your browser using DataLab