Renamed nmoves to nmove so it is more consistent with the other scripts

This commit is contained in:
Nora Wickelmaier 2024-04-25 17:58:47 +02:00
parent fa3d400ede
commit 0b067d8419

View File

@ -47,7 +47,7 @@ datitem$scaleSize <- aggregate(scaleSize ~ item, dat, mean)$scaleSize
datitem$rotationDegree <- aggregate(rotationDegree ~ item, dat, mean)$rotationDegree
datitem$npaths <- aggregate(path ~ item, dat, function(x) length(unique(x)))$path
datitem$ncases <- aggregate(case ~ item, dat, function(x) length(unique(x)))$case
datitem$nmoves <- aggregate(event ~ item, dat, table)$event[,"move"]
datitem$nmove <- aggregate(event ~ item, dat, table)$event[,"move"]
datitem$nflipCard <- aggregate(event ~ item, dat, table)$event[,"flipCard"]
datitem$nopenTopic <- aggregate(event ~ item, dat, table)$event[,"openTopic"]
datitem$nopenPopup <- aggregate(event ~ item, dat, table)$event[,"openPopup"]
@ -58,7 +58,7 @@ rm(datpath)
df <- datitem[, c("precision", "generalizability", "nvariants", "duration",
"distance", "scaleSize", "rotationDegree", "npaths",
"ncases", "nmoves", "nflipCard", "nopenTopic",
"ncases", "nmove", "nflipCard", "nopenTopic",
"nopenPopup")] |>
scale()
@ -112,12 +112,12 @@ factoextra::fviz_cluster(list(data = df, cluster = cluster),
ggtheme = ggplot2::theme_bw())
aggregate(cbind(precision, generalizability, nvariants, duration, distance,
scaleSize , rotationDegree, npaths, ncases, nmoves,
scaleSize , rotationDegree, npaths, ncases, nmove,
nflipCard, nopenTopic, nopenPopup) ~ cluster, datitem,
mean)
aggregate(cbind(duration, distance, scaleSize , rotationDegree, npaths,
ncases, nmoves, nflipCard, nopenTopic, nopenPopup) ~ cluster,
ncases, nmove, nflipCard, nopenTopic, nopenPopup) ~ cluster,
datitem, max)
item <- sprintf("%03d", as.numeric(gsub("item_([0-9]{3})", "\\1",