This is an R HTML document. When you click the Knit HTML button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(googleVis)
getOption("viewer", NULL)
## NULL
DengueIndia <- read.table("dengue.txt", header = TRUE, sep="\t", fill = TRUE, strip.white = TRUE, stringsAsFactors = TRUE, na.strings = "EMPTY") head(DengueIndia)
## States Denguecase ## 1 Andhra Pradesh 181 ## 2 Arunachal Pradesh 0 ## 3 Assam 18 ## 4 Bihar 1 ## 5 Chattisgarh 51 ## 6 Goa 29
DenguecaseIndia <- DengueIndia[, c("States","Denguecase")] DengueStateName <- DengueIndia[, "States"] head(DengueStateName)
## [1] Andhra Pradesh Arunachal Pradesh Assam Bihar ## [5] Chattisgarh Goa ## 35 Levels: Andhra Pradesh A& N Island Arunachal Pradesh Assam ... West Bengal
head(DenguecaseIndia)
## States Denguecase ## 1 Andhra Pradesh 181 ## 2 Arunachal Pradesh 0 ## 3 Assam 18 ## 4 Bihar 1 ## 5 Chattisgarh 51 ## 6 Goa 29
DengueStates <- gvisGeoChart(DengueIndia, "States", "Denguecase", options=list(region="IN", displayMode="regions", resolution="provinces")) plot(DengueStates)
You can also embed plots, for example:
plot(DengueStates)