先前的错误< 0:比较(3)仅适用于lda分析的原子和列表类型

时间:2017-04-26 17:35:11

标签: r pca lda

我试图制作lda(线性判别分析),但我不断收到此错误:

错误
prior < 0 : 
  comparison (3) is possible only for atomic and list types.

我使用的是lda功能:

DataI
DataQF <- DataI[, 2:12]
mylda <- lda(regimen ~ ., DataQF,na.omit)
mylda

这是DataI的片段

           id vasos lumenv fibrastot lumenfib paredfi porlig porsub porepid poraer porendo regimen              habito
1     nitidum115  1259  8.426      3600    2.869   0.925 31.141 36.459      NA     NA      NA    seco       upright_shrub
2     nitidum116  1056 10.392      3600    2.629   0.615 39.792 28.465      NA     NA      NA    seco       upright_shrub
3     nitidum117   917  8.249      7867    3.326   0.885 48.346 22.894      NA     NA      NA    seco       upright_shrub
4     nitidum118   928  7.990     13867    2.565   0.880 43.079 28.563      NA     NA      NA    seco       upright_shrub
5     nitidum119   736  7.180     14933    2.472   1.122 38.264 30.015      NA     NA      NA    seco       upright_shrub
6     nitidum120   496  6.631     19600    2.265   0.916 35.046 30.436      NA     NA      NA    seco       upright_shrub
7     muticum123   133  5.752     16267    2.344   0.914 17.457 23.093      NA     NA      NA  humedo             cushion
8     muticum124   117  3.872     24533    1.588   0.741  9.958 20.891      NA     NA      NA  humedo             cushion
9     muticum125   101  2.486     26800    1.225   0.769  5.565  7.214      NA     NA      NA  humedo             cushion
10    muticum135   123  2.657     24267    1.444   0.568  8.307 13.725      NA     NA      NA  humedo             cushion
11    muticum136   133  3.461     38667    1.330   0.628 12.504 27.871      NA     NA      NA  humedo             cushion
12    muticum137   267  6.259     33600    2.273   0.761 19.611 30.690      NA     NA      NA  humedo             cushion
13   corimbosa86   261 17.187      8133    8.677   1.831 20.441     NA  15.515  0.000      NA    seco        stem_rosette
14   corimbosa87   352 25.777      5867    7.612   2.123 23.000     NA  17.980  0.000      NA    seco        stem_rosette
15   corimbosa88   261 15.441     11600    7.844   1.967 31.459     NA  17.119  0.000      NA    seco        stem_rosette
16   corimbosa89   309 24.084     12267    8.285   1.775 34.001     NA  15.290  0.000      NA    seco        stem_rosette
17   corimbosa90   341 14.598     10800    7.001   1.887 26.551     NA  21.303  0.000      NA    seco        stem_rosette

你知道我该怎么做才能避免这个错误???

0 个答案:

没有答案