2
food.2.clust <- lapply(1:2, function(nc) check_food_clustering[cut.2==nc])
重新运行与调试 错误作为
未定义的列选择
food.2.clust <- lapply(1:2, function(nc) check_food_clustering[cut.2==nc])
重新运行与调试 错误作为
未定义的列选择
试试:
food.2.clust <- lapply(1:2, function(nc) check_food_clustering[cut.2==nc, ])
您需要的条件cut.2==nc
食品\t能源\t蛋白\t脂肪\t钙\t铁 –
> hc.complete = hclust(DIST(check_food_clustering),方法= “完整”) >后切一个逗号。 2 < - cutree(hc.complete.link,k = 2) > food.2.clust < - lapply(1:2,function(nc)check_food_clustering [cut.2 == nc]) Show Traceback Rerun与调试 错误['.data.frame'(check_food_clustering,cut.2 == nc): 未定义的列被选中 –