if(!requireNamespace('remotes',quietly = T)) install.packages('remotes',update=F)
remotes::install_github('biomarble/onekeyMap',dependencies=T,upgrade = F)
if(!requireNamespace('remotes',quietly = T)) install.packages('remotes',update=F)
if(!requireNamespace('onekeyMap',quietly = T)){
tryCatch({
remotes::install_github('biomarble/onekeyMap',dependencies=T,upgrade = F)
},error = function(e){
remotes::install_url('https://download.fastgit.org/biomarble/onekeyMap/archive/main.zip',dependencies = T,upgrade = F)
})
}
Thanks to fastgit - the mirror speeder for GitHub.com.
heatFile=system.file('demoChina','Province.heat.csv',package = 'onekeyMap')
data=read.csv(heatFile,header=T,check.names = F,na.strings = "-",encoding = 'UTF-8')
map=mapChina_fill_province(data,label="Production",title="2019 Productions of Cotton",colorTrans="log10")
png('chinaMap1.png',w=3000,h=2000,res=300)
plot(map)
dev.off()
-
Report bugs/suggestions to Issues