我正在使用包fields
进行空间分析。
我的数据集如下:
x y
Kopenhagen 12,57 55,68
Rotterdam 4,48 51,92
Belgrade 20,46 44,82
Budapest 19,04 47,5
Dublin -6,27 53,34
Rome 12,48 41,89
Lisbon -9,14 38,71
Bucharest 26,1 44,45
Madrid -3,7 40,42
Lausanne 6,63 46,52
London -0,13 51,5
Kiel 10,13 54,33
Augsburg 10,89 48,36
Innsbruck 11,398 47,25
Helsinki 24,94 60,17
Lyon 4,83 45,77
Ngreece 22,5 41,5
Ancona 13,11 43,37
Forde 5,9 61,44
Warsawa 21,01 52,23
Uppsala 17,64 59,86
Barcelona 2,17 41,38
Prague 14,42 50,09
这是的输出
dput(map)
structure(list(x = structure(c(6L, 18L, 11L, 10L, 21L, 5L, 23L,
16L, 17L, 22L, 1L, 2L, 3L, 4L, 15L, 19L, 14L, 7L, 20L, 12L, 9L,
13L, 8L), .Label = c("-0,13", "10,13", "10,89", "11,398", "12,48",
"12,57", "13,11", "14,42", "17,64", "19,04", "20,46", "21,01",
"2,17", "22,5", "24,94", "26,1", "-3,7", "4,48", "4,83", "5,9",
"-6,27", "6,63", "-9,14"), class = "factor"), y = structure(c(20L,
16L, 8L, 12L, 18L, 5L, 1L, 7L, 2L, 10L, 15L, 19L, 13L, 11L, 22L,
9L, 4L, 6L, 23L, 17L, 21L, 3L, 14L), .Label = c("38,71", "40,42",
"41,38", "41,5", "41,89", "43,37", "44,45", "44,82", "45,77",
"46,52", "47,25", "47,5", "48,36", "50,09", "51,5", "51,92",
"52,23", "53,34", "54,33", "55,68", "59,86", "60,17", "61,44"
), class = "factor")), .Names = c("x", "y"), class = "data.frame", row.names=
c("Kopenhagen","Rotterdam", "Belgrade", "Budapest", "Dublin", "Rome", "Lisbon",
"Bucharest", "Madrid", "Lausanne", "London", "Kiel", "Augsburg",
"Innsbruck", "Helsinki", "Lyon", "Ngreece", "Ancona", "Forde",
"Warsawa", "Uppsala", "Barcelona", "Prague"))
和
[1] 97.11559 59.86429 25.85145 54.56235 86.00903 17.45889 81.48449
[8] 87.57361 68.49520 44.40894 106.80953 67.36760 77.33586 47.96955
[15] 35.00993 75.26571 43.15965 17.55405 65.85301 46.19634 126.52848
[22] 42.26424 53.29187
第一个数据集称为map
,第二个称为sigma
。
我写了这段代码:
fit<-Krig(map, sigma, theta=100)
但它给了我以下错误:
Error in signif(mat, digits) :
Non-numeric argument to mathematical function
我不明白我错在哪里,因为我的数据集的组织看起来与字段包手册中的相同。
非常感谢任何帮助。