Skip to content

Commit

Permalink
fix bug issue2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lchiffon committed Apr 24, 2017
1 parent 3191eae commit 5b2eb58
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,18 @@ toLabel = function(city){
labels = sapply(city, function(x){
if(tolower(substr(x,1,1)) %in% letters){
return(tolower(x))
} else if(grepl(.triList[[1]], x)|
}else if(x == .triList[[5]] | grepl(paste0(.triList[[5]],.triList[[7]][1]), x)){
warning("Using Jilin Province instead of Jilin City!")
return(.triList[[5]])
} else if(grepl(.triList[[5]], x) & !grepl(paste0(.triList[[5]],.triList[[7]][1]), x)){
return(paste0(.triList[[5]],.triList[[7]][2]))
}
else if(x == .triList[[6]] | grepl(paste0(.triList[[6]],.triList[[7]][1]), x)){
warning("Using Hainan Province instead of Hainan City!")
return(.triList[[6]])
}else if(grepl(.triList[[6]], x) & !grepl(paste0(.triList[[6]],.triList[[7]][1]), x)){
return(paste0(.triList[[6]],.triList[[7]][2]))
}else if(grepl(.triList[[1]], x)|
grepl(.triList[[2]], x)|
grepl(.triList[[3]], x)|
grepl(.triList[[4]], x)
Expand Down
Binary file modified data/leafletcn.map.names.rda
Binary file not shown.
Binary file modified data/triList.rda
Binary file not shown.

1 comment on commit 5b2eb58

@Lchiffon
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3

Please sign in to comment.