[Biomod-commits] Uncorrect mapping coordinates : coor and Data are not of the same length
Amandine Cornille
amandine.cornille at u-psud.fr
Wed Dec 7 17:45:01 CET 2011
Hi all,
I am using Biomod package for niche modelling.
I did the initial state and lauched the model. After I tried to plot the predictions on a map, but I have this error message :
> multiple.plot(Pred_sylvestris[,1:9,1,1],coordXY[Biomod.PA.sample$MyDataPA2$PA1,])
Erreur dans multiple.plot(Pred_sylvestris[, 1:9, 1, 1], coordXY[Biomod.PA.sample$MyDataPA2$PA1, :
Uncorrect mapping coordinates :_coor and Data are not of the same length_
When I checked files I used, indeed coor and data are not one the same length...
> length(coordXY)
[1] 2
> length(Biomod.PA.sample)
[1] 1
> head(coordXY)
X Y
1 16.12 47.88
2 16.11 47.89
6 16.22 48.39
7 17.19 44.00
8 4.33 50.94
9 15.57 44.97
> head(Biomod.PA.sample)
$sylvestris
$sylvestris$PA1
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
[17] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
[33] 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
[49] 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
[65] 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
[81] 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
I deleted all duplicate XY coor in the case of it was that by using : MyData3<-MyData[!duplicated(MyData[,c(1,2)]),]
But After re ran initial.state and models, It didn't work again giving the same error message ....
May you help me please ?
Thanks a lot for your help,
Amandine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20111207/7cd1dabf/attachment.htm>
More information about the Biomod-commits
mailing list