强制性引入的NA-在输出中没有列出NA

时间:2018-09-30 13:14:24

标签: r

运行以下代码后,我收到警告消息“强制引入的NA”,但是当我检查输出时,没有NA:

#remove the records with missing values from the dataset
Data <- na.omit(Data)
#how many missing values in total are there?
summary(Data)
#Library call
library(cluster)
#convert the Gower dissimilarity object into a distance matrix
as.matrix(dist(Data))
Dist <- as.matrix(Dist)

抽样结果:

1 2 3 4
1 0.000000e+00 951.77066 1351.64209 166.89518
5 6 7 8 9
1 1.352908e+02 258.11690 51088.23 2212.0103 515.47992
10 11 12 13
1 2367.57026 1.217035e+02 340.10330 330.23676
14 15 16 17
1 4405.2212 3.313772e+02 193.60513 3.168459e+02
18 19 20 21
1 422.42520 3.301973e+02 174.90726 1972.93727
22 23 24 25
1 160.52936 2084.11335 137.17138 9.516972e+01
26 27 28 29
1 168.36518 3.319189e+02 335.60344 3.331150e+02

如果输出中不存在NA,为什么会出现警告?

0 个答案:

没有答案