@@ -74,7 +74,7 @@ map_data <- function(map, region = ".", exact = FALSE, ...) {
74
74
# ' @param regions map region
75
75
# ' @param fill fill colour
76
76
# ' @param colour border colour
77
- # ' @param " xlim, ylim" map xlim and ylim, , see \code{\link[maps]{map}} for details
77
+ # ' @param xlim,ylim latitudinal and logitudinal range for extracting map polygons , see \code{\link[maps]{map}} for details
78
78
# ' @param ... other arguments passed onto \code{\link{geom_polygon}}
79
79
# ' @export
80
80
# ' @examples
@@ -97,13 +97,13 @@ map_data <- function(map, region = ".", exact = FALSE, ...) {
97
97
# ' #Same map, with geographical context
98
98
# ' data(us.cities)
99
99
# ' capitals <- subset(us.cities, capital == 2)
100
- # ' ggplot(capitals,aes(long,lat)) +
101
- # ' borders("world",xlim= c(-130,-60),ylim= c(20,50))+
100
+ # ' ggplot(capitals, aes(long, lat)) +
101
+ # ' borders("world", xlim = c(-130, -60), ylim = c(20, 50)) +
102
102
# ' geom_point(aes(size = pop)) +
103
- # ' scale_size_area()+ coord_quickmap(xlim= c(-130,-60),ylim= c(20,50))
103
+ # ' scale_size_area() + coord_quickmap(xlim = c(-130, -60), ylim = c(20, 50))
104
104
# ' }
105
105
borders <- function (database = " world" , regions = " ." , fill = NA , colour = " grey50" , xlim = NULL ,ylim = NULL ,... ) {
106
- df <- map_data(database , regions ,xlim = xlim ,ylim = ylim )
106
+ df <- map_data(database , regions , xlim = xlim , ylim = ylim )
107
107
geom_polygon(aes_(~ long , ~ lat , group = ~ group ), data = df ,
108
108
fill = fill , colour = colour , ... , inherit.aes = FALSE )
109
109
}
0 commit comments