title: Create a GeoTiff from leaflet map
body: <p>I'm trying to create a GeoTiff from a leaflet map. I've tried to find answers to this online but non of them seem to work for me. I'm quite new with using R.
  The geodata is a 2000*10 matrix where the title, long and latitude is found. 
  Here is my code: </p>
  
  <pre><code>install.packages('leaflet')
  install.packages('rgdal')
  install.packages('raster')
  install.packages('sp')
  
  
  library(leaflet)
  library(raster)
  library(rgdal)
  library(raster)
  library(sp)
  
  
  sites &lt;- data.frame(Name=(geodata[,2]),Long=(geodata[,10]),Lati=(geodata[,9]))
  
  ma &lt;- leaflet()
  ma &lt;- addTiles(ma)
  ma &lt;- addMarkers(ma, lng=sites$Long, lat=sites$Lati, popup=sites$Name)
  ma
  
  rast &lt;- writeRaster(ma, filename="Worldmap.tif", format="GTiff")
  </code></pre>
  
  <p>It is the last step "writeRaster" that is not working. The error message that I get looks like this : </p>
  
  <pre><code>Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function 'writeRaster' 
  for signature '"leaflet", "character"'
  </code></pre>
  
  <p>Any idea of where the error might be? </p>