我在typeof(x)中遇到错误:对象“ ParcelArea.m2”。未找到

时间:2018-07-25 10:54:39

标签: r

我遇到这个奇怪的错误{我在typeof(x)中遇到错误:对象'ParcelArea.m2'。找不到},即使我在数据框中看到了变量名。

> names(Cadastral)
 [1] "CadastralZoneNameAB"       "CadastralZoneCode"         "ParcelCadastralNumber"    
 [4] "Urban_Rural"               "ParcelArea.m2."            "LandType"                 
 [7] "ParcelLocalityName"        "ParcelCadastralObjectName" "ParcelAddressText"        
[10] "CultureNumber"             "ParcelsCurrentUse"         "CultureArea.m2."          
[13] "ParcelTypeOfUse"           "IsNatural"                 "Name"                     
[16] "FirstName"                 "FatherName"                "IDCode"                   
[19] "IDType"                    "MunicipalityName"          "HouseNumber"              
[22] "PersonAddressDescription"  "SharedQuotaPercentage"     "SharedQuotaNumerator"     
[25] "SharedQuotaDenominator"

LOOK at the variable 5 "ParcelArea.m2."

Code I'm using is:
 > Cadastral%>% group_by(CadastralZoneNameAB,ParcelTypeOfUse)%>% 
+   +   summarise(ParcelArea.m2.=sum(ParcelArea.m2.))
Error in typeof(x) : object 'ParcelArea.m2.' not found

值得一提的是,昨天相同的代码在这个特定的数据集上起作用。为什么我今天遇到此错误感到沮丧?

请参阅昨天的代码和输出:

> Cadastral%>% group_by(CadastralZoneNameAB,ParcelTypeOfUse)%>% 
+   summarise(ParcelArea.m2=sum(ParcelArea.m2.))
# A tibble: 3 x 3
# Groups:   CadastralZoneNameAB [?]
  CadastralZoneNameAB ParcelTypeOfUse ParcelArea.m2
               <fctr>          <fctr>         <int>
1             HAJVALI       Bujqësore           608
2             MATIÇAN       Bujqësore           400
3           PRISHTINË Tokë Ndërtimore           895

今天相同的代码,相同的数据集不同的输出:(

> Cadastral%>% group_by(CadastralZoneNameAB,ParcelTypeOfUse)%>% 
+   +   summarise(ParcelArea.m2=sum(ParcelArea.m2.))
Error in typeof(x) : object 'ParcelArea.m2.' not found

能帮我定义这个问题吗?

谢谢!

0 个答案:

没有答案