Your question is not really clear because: - I don't know what 'convert.r' do - I don't know where 'transf.cgm' is (BTW, 'cgm' is not the usual extension for shapefiles which is 'shp'). Check if it is really in your current directory.
but, yes, if what you want is to import shapefiles in R, it's easy. Look at the 'maptools' package on CRAN (there is also a 'shapefiles' package). And if you want to build an adjacency matrix for a map of polygons (as I guess from the header of you mail), look at the 'spdep' package, too. It is then possible to write a text file with your data as a list readable by WinBUGS. (I send a copy of my answer to the the R-SIG-GEO mailing list which can be of interest to you). Hope it helps. Christophe -- Christophe DECLERCQ, MD Observatoire Régional de la Santé Nord-Pas-de-Calais 13, rue Faidherbe 59046 LILLE Cedex FRANCE Phone +33 3 20 15 49 24 Fax +33 3 20 55 92 30 E-mail [EMAIL PROTECTED] > -----Message d'origine----- > De : [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] la part de Orlando Zacarias > Envoyé : mercredi 22 octobre 2003 11:58 > À : [EMAIL PROTECTED] > Objet : [R] adjacency matrix > > > Dear R experts, > I am new to the list and R software. I need to convert arcview > file to Winbugs having R has middle package. Got from friends > that it is possible following the steps: > 1. Converting arcview shapefile to "cgm clear text file" > 2. Downloading "convert.r" to into R > 2.1 use source("convert.r") > 2.2 convert("filename_cgm") without the extension. > But that doesn't work, given the following errors: > ---------------------------- > R : Copyright 2003, The R Development Core Team > Version 1.8.0 (2003-10-08) > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > R is a collaborative project with many contributors. > Type 'contributors()' for more information. > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for a HTML browser interface to help. > Type 'q()' to quit R. > [Previously saved workspace restored] > > source("convert.r") > > convert("transf") > Error in file(file, "r") : unable to open connection > In addition: Warning message: > cannot open file `transf.cgm' > > > ----------------------------------- > Have i done some mistakes?Or i am missing some files? > Please assist. > Rgs, > Orlando. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help