I am trying to create a map using tm_shape on r
While the process is relatively easy with regular .tif rasters the process seems more complicated when I try to use a raster from a digitized historic map to be the background (historic.tif).
When I load the historic.tif file on QGIS I can then plot my other shapefiles (roads, cities) and make the map. However on r I can't load the file. I get the following message :
This historic.tif is an old map of Liberia that I found in the archives and digitized using QGIS and then saved as a .tif file.
Error in .local(.Object, ...) :
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", : Cannot create a RasterLayer object from this file. (file does not exist)
library(sf)
library(raster)
library(dplyr)
library(spData)
library(spDataLarge)
library(rgdal)
library(rgeos)
library(tmap)
historic_map <- raster("~/historic.tif")
Does anyone has a solution to propose?
file.exists("~/historic.tif")
say?file.info("~/historic.tif")
say?