if (FALSE) {
# some fake data around London
df <- data.frame(lat = 51.5+runif(40,-0.3,0.3),
lon = 0+runif(40, -0.3,0.3),
slope = rnorm(40, c(rep(-0.4,20),rep(0.4,20))),
g = factor(c(rep("a",20), rep("b",20))))
theplots <- plot_trend(df, "g", maptype = "terrain-background")
theplots$A # map
theplots$B + labs(subtitle = "Use ggplot usual commands to modify the plots") # boxplots
}
Run the code above in your browser using DataLab