Reputation: 449
I have the below code:
eng <- rgdal::readOGR(paste0("https://opendata.arcgis.com/datasets/",
"8d3a9e6e7bd445e2bdcc26cdf007eac7_4.geojson"))
countries <- rgdal::readOGR(paste0("https://opendata.arcgis.com/datasets/",
"92ebeaf3caa8458ea467ec164baeefa4_0.geojson"))
eng <- sf::st_as_sf(eng)
countries <- sf::st_as_sf(countries)
UK <- countries[-1,]
names(eng)[3] <- "Region"
names(UK)[3] <- "Region"
UK$objectid <- 10:12
eng <- eng[-2]
UK <- UK[c(1, 3, 9:11)]
UK <- rbind(eng, UK)
UK<-UK%>% arrange(Region)
UK$Sales<-c(49, 118, 51, 27, 53, 140,76,45,51,11,55,48)
ggplot2::ggplot(UK, ggplot2::aes(fill = Sales)) + ggplot2::geom_sf()+
scale_fill_gradient(low='green', high='blue')+
theme(axis.line.x.bottom = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.border = element_blank(),
panel.background = element_blank(),
axis.line.y.left = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_blank())+labs(fill = "Number of car sales\n (7th October 2019\n - 26th
January 2020)")
I get this output in the final PDF:
## OGR data source with driver: GeoJSON
## Source: "https://opendata.arcgis.com/datasets/8d3a9e6e7bd445e2bdcc26cdf007eac7_4.geojson", layer: "Region__December_2015__Boundaries"
## with 9 features
## It has 5 fields
## OGR data source with driver: GeoJSON
## Source: "https://opendata.arcgis.com/datasets/92ebeaf3caa8458ea467ec164baeefa4_0.geojson", layer: "Countries__December_2019__Boundaries_UK_BUC"
## with 4 features
## It has 10 fields
Is there any way I can stop this, I have set messages=FALSE, Warning=FALSE, Echo=FALSE, but still get the same
Upvotes: 0
Views: 116
Reputation: 449
Ok I have solved this. This seems to have worked
```{r, echo=FALSE, message=FALSE, results='hide'}
Upvotes: 1