Creating inset maps using spatial objects

Advertisements

4 thoughts on “Creating inset maps using spatial objects

  1. Pingback: Creating inset maps using spatial objects – Mubashir Qasim

    • Hi Graziano,

      in fact I am using R 3.3.1, so install.packages(c(“rgdal”, “rgeos”)) should work. If not, you can still use an older R version or copy manually the libraries of the old R version (use .libPaths to find out the directory, e.g. C:/Program Files/R/R-3.2.3/library) to the new library directory (e.g., C:/Program Files/R/R-3.3.1/library).

      All the best,

      Jannes

      Like

      • Thank you Jannes.
        I am new in R.
        I receive this error.
        > install.packages(c(“rgdal”, “rgeos”))
        Installing packages into ‘C:/Users/graziano/Documents/R/win-library/3.3’
        (as ‘lib’ is unspecified)
        — Please select a CRAN mirror for use in this session —
        provo con l’URL ‘https://cran.stat.unipd.it/bin/windows/contrib/3.3/rgdal_1.1-10.zip’
        Content type ‘application/zip’ length 15929880 bytes (15.2 MB)
        downloaded 15.2 MB

        provo con l’URL ‘https://cran.stat.unipd.it/bin/windows/contrib/3.3/rgeos_0.3-19.zip’
        Content type ‘application/zip’ length 1782737 bytes (1.7 MB)
        downloaded 1.7 MB

        package ‘rgdal’ successfully unpacked and MD5 sums checked
        Warning: unable to move temporary installation ‘C:\Users\graziano\Documents\R\win-library\3.3\file6e343a9e31c8\rgdal’ to ‘C:\Users\graziano\Documents\R\win-library\3.3\rgdal’
        package ‘rgeos’ successfully unpacked and MD5 sums checked

        The downloaded binary packages are in
        C:\Users\graziano\AppData\Local\Temp\Rtmp6hoguy\downloaded_packages
        > # attach packages
        > library(“sp”)
        > library(“raster”)
        > library(“grid”)
        > library(“gridBase”)
        > library(“TeachingDemos”)
        > library(“rworldmap”)
        ### Welcome to rworldmap ###
        For a short introduction type : vignette(‘rworldmap’)
        > library(“RColorBrewer”)
        > library(“classInt”)
        > # attach country polygons
        > data(countriesLow)
        > cous # find the Netherlands
        > net
        > # load meuse.riv
        > data(meuse.riv)
        > # convert to SpatialPolygons
        > riv
        > # meuse dataset
        > data(meuse)
        > coordinates(meuse) proj4string(meuse) # classifying cadmium into 5 classes
        > q_5 pal my_cols # we also need lat/lon coordinates
        > meuse_tr library(“rgdal”)
        Error in library(“rgdal”) : there is no package called ‘rgdal’

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s