[R] Reshaping geographic data

MacQueen, Don macqueen1 at llnl.gov
Mon Oct 17 20:49:59 CEST 2016

I suggest you simplify your computing task by making this into three
distinct tasks:

1. get copies of the shapefiles on your computer. Do this outside of R.
Since this has two parts, i.e., downloading and unzipping, it will be
easier at first to do it outside of r. Then later you can figure out how
to do it using R if necessary.

2. figure out how to load shapefiles into R (the key package is rgdal)

3. figure out how to reshape a shapefile in R (I don't know what you mean
by reshape a shape file).

For steps 2 and 3, ask further questions on r-sig-geo

Are you aware that a "shapefile" is actually several files, all with the
same prefix but different suffixes? I'd suggest putting them in a
subdirectory of your working directory.


Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550

On 10/17/16, 8:42 AM, "R-help on behalf of G.Maubach at weinwolf.de"
<r-help-bounces at r-project.org on behalf of G.Maubach at weinwolf.de> wrote:

>Hi All,
>I need to reshape an ESRI shape file: http://arnulf.us/PLZ and resp
>I found an instruction for T-SQL Server:
>How can I do this using R?
>Kind regards
>-- cut --
>Here's my code so far:
>    url = "http://www.metaspatial.net/download/plz.tar.gz",
>    destfile = "C:/temp/plz.tar.gz")
>untar(tarfile = "C:/temp/plz.tar.gz",
>      exdir = "C:/temp",
>      compressed = "gzip")
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list