I'd like to create a data.frame
with the descriptives of my 107 items in the columns. When I do the order like that, it only gives me the descriptives for my first item. Maybe somebody can help me out and knows what is wrong in the function.
variables <- names(srsi)
names.items <- c(grep("SRSI_", variables, value = TRUE))
item.diff <- data.frame(matrix(NA, ncol=8, nrow=length(names.items)))
names(item.diff) <- c("Item", "n", "mean", "sd", "min", "max", "range", "se")
length(names.items)
for(i in 1:length(names.items)){
item <- names.items[i]
par <- describe(srsi[,-1], skew = F)
item.diff[i, c("n", "mean", "sd", "min", "max", "range", "se")]
}