thanks to all the help so far I have code now that works on windows (albeit very clunky) that can read the pertinent info from the shape header and return a list with all the necessary parameters to read info out of the shape file. Now come the big design questions 1) I have considered building a map object, basically a list that would hold the info from the shape file and a data frame as part of the list. Should all of the vertices of a shape be stored in this structure? I can see this getting big really fast. My idea was to store only offset and the size of each record and whenever a shape needs to be plotted or accessed the vertices can be retrived from the .shp file through an access function. the problem is if the user wants to project the map all projections will have to be done on the fly as the vertices are accessed. for those who don't know shape files are stored in 3 files, .shp .shx and .dbf the .shp file holds the geometric information, the .shx file holds the ofsets and the record sizes for each shape, and the .dbf file holds the attribute information. which brings me to question 2 2) the .dbf file contains the attribute information, so I basically nead to write another version of read.table to access the dbf file and store it as a data frame (the natural equivalent of an ArcView data table). Is there a way to extend or access the functions of read.table to construct a data frame without using a lot of memory building seperate vectors and factors etc. and binding them into a data frame. 3) I have been cheating. Dr. Ripley suggested I start compiling this as a package, using the supplied make files. Very sensible advice, however I am not exactly sure how to do this on windows. I have checked the faq which says there is a sample Makefile in the eda package, I assume this is Unix only couldn't find it. So to do this as far as I can tell from the dcumentation I could get my hands on I need to make a folder in \rw0642\src\library and put the subdirectories R, src, man and data and then run make? Or am I missing something? Thanks again for all the help. Nicholas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 28 Jul 1999, Nicholas Lewin-Koh wrote:> 3) I have been cheating. Dr. Ripley suggested I start compiling this as > a package, using the supplied make files. Very sensible advice, however I am > not exactly sure how to do this on windows. I have checked the faq which > says there is a sample Makefile in the eda package, I assume this > is Unix only couldn't find it. So to do this as far as I can tell from the > dcumentation I could get my hands on I need to make a folder in > \rw0642\src\library and put the subdirectories R, src, man and data and > then run make? Or am I missing something?Try looking at the R for Windows FAQ or the Venables & Ripley R complements. Basically, to make package foo under Windows, set a standard R packages source (with R, src, man and data) in ...\rw0642\src\library\foo, cd to ..\rw0642\src\gnuwin32 and `make pkg-foo'. You are very unlikely to need a Makefile (under Windows or Unix). -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._