From 0b067d8419b0616af7ddcc85dca12d47102eab0f Mon Sep 17 00:00:00 2001 From: nwickel Date: Thu, 25 Apr 2024 17:58:47 +0200 Subject: [PATCH] Renamed nmoves to nmove so it is more consistent with the other scripts --- code/07_item-clustering.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/07_item-clustering.R b/code/07_item-clustering.R index 2c6388f..5dc0cd6 100644 --- a/code/07_item-clustering.R +++ b/code/07_item-clustering.R @@ -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",