Hey guys. I am very new to Rstudio and need some help. How would you guys continue with this code and information? What more code can I use to explain the analysis better?
# Remove all rows with missing data mcdonalds <- na.omit(mcdonalds) # Calculate descriptive satistics summary(mcdonalds) # New dataset only including qualitative descriptives qualitative <- mcdonalds %>% select(Calories, Fat, Sugars, Grams) # How many clusters? fviz_nbclust(mcdonalds[1:200, 3:6], kmeans, method = "wss") # Fit a kmodel with 4 clusters model1 <- kmeans(mcdonalds[, 3:6], centers = 4) model1 # Add cluster membership to data frame mcdonalds$cluster_membership_model1 <- model1$cluster # Create a CrossTable between Category and membership table(mcdonalds$Category, mcdonalds$cluster_membership_model1)