data(RS.data)
codeNames = c('Data','Technical.Constraints','Performance.Parameters',
'Client.and.Consultant.Requests','Design.Reasoning','Collaboration');
accum = ena.accumulate.data(
units = RS.data[,c("UserName","Condition")],
conversation = RS.data[,c("Condition","GroupName")],
metadata = RS.data[,c("CONFIDENCE.Change","CONFIDENCE.Pre","CONFIDENCE.Post")],
codes = RS.data[,codeNames],
window.size.back = 4
)
set = ena.make.set(
enadata = accum,
rotation.by = ena.rotate.by.mean,
rotation.params = list(
accum$meta.data$Condition=="FirstGame",
accum$meta.data$Condition=="SecondGame"
)
)
plot = ena.plot(set)
### Subset rotated points and plot Condition 1 Group Mean
as.matrix(set$points$Condition$FirstGame)
first.game.points = as.matrix(set$points$Condition$FirstGame)
plot = ena.plot.group(plot, first.game.points, labels = "FirstGame",
colors = "red", confidence.interval = "box")
### Subset rotated points and plot Condition 2 Group Mean
second.game.points = as.matrix(set$points$Condition$SecondGame)
plot = ena.plot.group(plot, second.game.points, labels = "SecondGame",
colors = "blue", confidence.interval = "box")
### get mean network plots
first.game.lineweights = as.matrix(set$line.weights$Condition$FirstGame)
first.game.mean = colMeans(first.game.lineweights)
second.game.lineweights = as.matrix(set$line.weights$Condition$SecondGame)
second.game.mean = colMeans(second.game.lineweights)
subtracted.network = first.game.mean - second.game.mean
plot = ena.plot.network(plot, network = subtracted.network)
if (FALSE) print(plot)
Run the code above in your browser using DataLab