我有一个混合了数据类型(整数,字符和逻辑)的数据框,我正在尝试将其与雏菊群集在一起。
我正在使用:
gower_dist <- daisy(relchoice, metric = "gower")
并获得:
Error in daisy(relchoice, metric = "gower") :
invalid type character for column numbers 3, 4, 5, 7, 8, 10, 13, 14, 15, 16,
21, 29, 31, 32invalid type character for column numbers 3, 4, 5, 7, 8, 10,
13, 14, 15, 16, 21, 29, 31, 32invalid type character for column numbers 3,
4, 5, 7, 8, 10, 13, 14, 15, 16, 21, 29, 31, 32invalid type character for
column numbers 3, 4, 5, 7, 8, 10, 13, 14, 15, 16, 21, 29, 31, 32invalid type
character for column numbers 3, 4, 5, 7, 8, 10, 13, 14, 15, 16, 21, 29, 31,
32invalid type character for column numbers 3, 4, 5, 7, 8, 10, 13, 14, 15,
16, 21, 29, 31, 32invalid type character for column numbers 3, 4, 5, 7, 8,
10, 13, 14, 15, 16, 21, 29, 31, 32invalid type character for column numbers
3, 4, 5, 7, 8, 10, 13, 14, 15, 16, 21, 29, 31, 32invalid type character for
column numbers 3, 4, 5, 7, 8, 10, 13, 14, 15, 16, 21, 29, 31, 32invalid type
character for column numbers 3, 4, 5, 7, 8, 10, 13, 14, 15, 16, 21, 29, 31,
32
在此方面会有所帮助。
答案 0 :(得分:1)
我能够通过将分类字段转换为因子数据类型来解决此问题,例如:
server.rmi.ssl.disable=true