gSimplify not simplifying shapefile in R
<p>I'm unable to simplify a shapefile in R</p>

<p>Shapefile from here: <a href="https://geoportal.statistics.gov.uk/Docs/Boundaries/Local_authority_district_(GB)_2014_Boundaries_(Generalised_Clipped).zip" rel="nofollow">https://geoportal.statistics.gov.uk/Docs/Boundaries/Local_authority_district_(GB)_2014_Boundaries_(Generalised_Clipped).zip</a></p>

<pre><code>library(tmap)
library(maptools)
library(ggmap)

England &lt;- readOGR(dsn = "...")

#works fine
print(qtm(England, "LAD14CD", borders = NA, fill.title = "A-Level" )) 

# simplify the polygons
England&lt;-gSimplify(England,tol=0.01, topologyPreserve=TRUE)

print(qtm(England, "LAD14CD", borders = NA, fill.title = "A-Level" )) 
</code></pre>

<p>Gives an error of:</p>

<pre><code>Error in process_fill(data, g$tm_fill, gborders, gt, gf, z = z + which(plot.order ==  : 
Fill argument neither colors nor valid variable name(s)
</code></pre>

<p>If you look at the UK dataobject you can see that it has changed from a Large Spatial polygonDataFrame to Large Spatial Polygons and dropped the @data</p>

<p>Instead, if you try to only simplify the polygons in the Shapefile:</p>

<pre><code>England@polygons&lt;-gSimplify(England@polygons,tol=0.01, topologyPreserve=TRUE)
</code></pre>

<p>It says that:</p>

<pre><code>Error in gSimplify(England@polygons, tol = 0.01, topologyPreserve = TRUE) : 
cannot get a slot ("proj4string") from an object of type "list"
</code></pre>

<p>How can I simplify the polygons from a shapefile?</p>