如果你Chattisgarh
用Chhattisgarh
(with Chh...
) 替换它就可以工作。比较两个图:
library(googleVis)
StateMilk <- read.table(
text = "State 'Cow Milk CD' 'Cow Milk ND' 'Cow Milk Total' 'Buffalo Milk' 'Goat Milk' Total
'Andhra Pradesh' 1268.0 1054.0 2322.0 6603.0 0.4 8925.0
'Arunachal Pradesh' 9.0 23.0 32.0 NA NA 32.0
Assam 166.0 462.0 628.0 100.0 25.0 752.0
Bihar 986.0 1958.0 2943.0 2623.0 216.0 5783.0
Chattisgarh 56.0 471.0 527.0 296.0 43.0 866.0",
header = TRUE, stringsAsFactors = FALSE)
plot(gvisGeoChart(StateMilk, "State", "Total",
options=list(region="IN", displayMode="regions", resolution="provinces", width=600, height=400)))
StateMilk_with_2_h <- StateMilk
StateMilk_with_2_h$State[StateMilk_with_2_h$State == "Chattisgarh"] <- "Chhattisgarh"
plot(gvisGeoChart(StateMilk_with_2_h, "State", "Total",
options=list(region="IN", displayMode="regions", resolution="provinces", width=600, height=400)))