From ea074082794a3152e66011699979b219bf593dd7 Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Thu, 12 Oct 2017 19:44:06 +0800 Subject: [PATCH] Load needed broom library and suppress tidy warning. --- WA_active_schools.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WA_active_schools.R b/WA_active_schools.R index 7792496..394fa83 100644 --- a/WA_active_schools.R +++ b/WA_active_schools.R @@ -2,13 +2,15 @@ #install.packages("rgdal") library(rgdal) library(tidyverse) +library(broom) #install.packages("OpenStreetMap") library(OpenStreetMap) library(viridis) # Read the shapefile obtained from WA opendata (SLIP) shape <- readOGR(dsn = "data/", layer = "CurrentActiveSchoolsSemester12017_PublicDET_014") -shape.df <- tidy(shape) +# Suppress warning about no method existing for SpatialPointsDataframe - TODO use library sf +shape.df <- suppressWarnings(tidy(shape)) shape.df$latitude <- as.numeric(as.character(shape.df$latitude)) shape.df$longitude <- as.numeric(as.character(shape.df$longitude)) shape.df$totalschoo <- as.numeric(as.character(shape.df$totalschoo)) -- 2.30.2