Error: Insufficient values in manual scale. 37 needed but only 35 provided

My code here:

coef_names <-c("Agriculture, value added"="mydata$NV.AGR.TOTL.ZS","Industry, value added"="mydata$NV.IND.TOTL.ZS","Services, value added"="mydata$NV.SRV.TOTL.ZS", "Manufacturing, value added"="mydata$NV.IND.MANF.ZS", "Investment"="mydata$NE.GDI.TOTL.ZS","Government Expenditure"="mydata$NE.CON.GOVT.ZS", "Consumption"="mydata$NE.CON.PRVT.ZS","Gross fixed capital formation"="mydata$NE.GDI.FTOT.ZS","Exports"="mydata$NE.EXP.GNFS.ZS","Imports"="mydata$NE.IMP.GNFS.ZS","Electric power consumption"="mydata$EG.USE.ELEC.KH.PC","GDP per unit of energy use"="mydata$EG.GDP.PUSE.KO.PP.KD","Access to electricity"="mydata$EG.ELC.ACCS.ZS","Oil rents (% of GDP)"="mydata$NY.GDP.PETR.RT.ZS","CO2 emissions (kg per 2017 PPP $ of GDP)"="mydata$EN.ATM.CO2E.PP.GD.KD","CO2 emissions (metric tons per capita)"="mydata$EN.ATM.CO2E.PC","Rail lines (total route-km)"="mydata$IS.RRS.TOTL.KM","Railways, passengers carried (million passenger-km)"="mydata$IS.RRS.PASG.KM)", "Automated teller machines (ATMs) (per 100000 adults)"="mydata$FB.ATM.TOTL.P5","Container port traffic (TEU: 20 foot equivalent units)"="mydata$IS.SHP.GOOD.TU","Air transport, registered carrier departures worldwide"="mydata$IS.AIR.DPRT","Population density"="mydata$EN.POP.DNST","Population in the largest city"="mydata$EN.URB.LCTY.UR.ZS","Urban population (% of total population)"="mydata$SP.URB.TOTL.IN.ZS","Rural population (% of total population)"="mydata$SP.RUR.TOTL.ZS","Population, total"="mydata$SP.POP.TOTL","Land area (sq. km)"="mydata$AG.LND.TOTL.K2","Agricultural land (% of land area)"="mydata$AG.LND.AGRI.ZS","Forest area (% of land area)"="mydata$AG.LND.FRST.ZS","Permanent cropland (% of land area)"="mydata$AG.LND.CROP.ZS","Foreign direct investment, net inflows (% of GDP)"="mydata$BX.KLT.DINV.WD.GD.ZS","Net ODA received (% of central government expense)"="mydata$DT.ODA.ODAT.XP.ZS","Net ODA received (% of gross capital formation)"="mydata$DT.ODA.ODAT.GI.ZS","Personal remittances, received (% of GDP)"="mydata$BX.TRF.PWKR.DT.GD.ZS","Statistical Capacity score (Overall average)"=" mydata$IQ.SCI.OVRL")
a<-plot_coefs(reg1, reg2, reg3, reg4, reg5, reg6, reg7, reg8, reg9, reg10, reg11, reg12, reg13, reg14, reg15, reg16, reg17, reg18, reg19, reg20, reg21, reg22, reg23, reg24, reg25, reg26, reg27, reg28, reg29, reg30, reg31, reg32, reg33, reg34, reg35, reg36, reg37, ci_level = 0.95, coefs=coef_names, inner_ci_level=0.95,colors=c("grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey","grey"), legend.title = "Model",  groups =  list("GDP sector"=c("Agriculture, value added","Industry, value added","Services, value added","Manufacturing, value added"),"GDP subcomponents"=c("Investment","Government Expenditure","Consumption","Gross fixed capital formation","Exports","Imports"),"Energy consumption, oil rents"=c("Electric power consumption", "GDP per unit of energy use","Access to electricity","Oil rents (% of GDP)", "CO2 emissions (kg per 2017 PPP $ of GDP)", "CO2 emissions (metric tons per capita)"), "Infrastructure"=c("Rail lines (total route-km)", "Railways, passengers carried (million passenger-km)", "Automated teller machines (ATMs) (per 100000 adults)", "Container port traffic (TEU: 20 foot equivalent units)", "Air transport, registered carrier departures worldwide"),"Population"=c("Population density","Population in the largest city","Urban population (% of total population)", "Rural population (% of total population)", "Population, total"),"Land"=c("Land area (sq. km)", "Agricultural land (% of land area)", "Forest area (% of land area)", "Permanent cropland (% of land area)"), "FDI, ODA, Remittance"=c("Foreign direct investment, net inflows (% of GDP)", "Net ODA received (% of central government expense)", "Net ODA received (% of gross capital formation)", "Personal remittances, received (% of GDP)"), "Statistical capacity"="Statistical Capacity score (Overall average)"))

I got the error Error: Insufficient values in manual scale. 37 needed but only 35 provided.
  1. (function (x, ...) ...
  2. ggplot2:::print.ggplot(x)
  4. ggplot2:::ggplot_build.ggplot(x)
  5. base::lapply(data, scales_map_df, scales = npscales)
  6. ggplot2:::FUN(X[[i]], ...)
 13. ggplot2:::FUN(X[[i]], ...)
 14. self$map(df[[j]])
 15. ggplot2:::f(..., self = self)
 16. self$palette(n)
 17. ggplot2:::f(...)

Could you please help me ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.