![]() ![]() Hallo Joachim, ich weiß, wie ich eine neue Skala erstelle, die aus verschiedenen spalten bestehen soll. Why this error occurs and how to handle it is what I’m going to show you next.įor the example, I’m going to load the iris data set: The most common error message of colSums, rowSums, colMeans, and rowMeans is the following:Įrror in colMeans(x) : ‘x’ must be numeric However, are there other difficulties with colSums, rowSums, colMeans, and rowMeans? Unfortunately, yes… In case you want to learn more about missing values, check out this post. Just ignoring NA values is usually not the best idea. ![]() That’s an easy fix! But please note that the handling of missing values is a research topic by itself. rm = TRUE ) # Remove NA within rowMeans # 5.00 12.00 12.75 rm = TRUE ) # Remove NA within rowSums # 15 36 51ĬolMeans (data_na, na. rm = TRUE ) # Remove NA within colSums # X1 X2 X3 X4 # 16 30 20 36 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |