Re: [R-sig-Geo] get() in raster ?

2010-11-19 Thread Carson Farmer
Agus, according to ?get, x should be a variable name (given as a character string). So one *should* expect the behaviour that Matthew describes: > v = c("r1","r2","r3") > v [1] "r1" "r2" "r3" > get(v) Error in get(v) : object 'r1' not found > get('v') [1] "r1" "r2" "r3" Carson On 19 November 20

Re: [R-sig-Geo] Finding polygon centroid

2010-10-18 Thread Carson Farmer
Thiago, Dear list members, > How can I find a polygon centroid? Google shows me a "get.Pcent" function > within maptools, but it seems to be no longer available... > Best wishes, > Thiago. > I think coordinates from the sp package will do what you want... library(sp) ?coordinates Carson

Re: [R-sig-Geo] spatial interaction models

2010-10-07 Thread Carson Farmer
Hi Roger (and Barry), > Maybe just do it in the usual way, repeating the i and j specific variables? > Unless you want to constrain anything, it shouldn't be more than reshaping > to long format and rep()'ing the origin and destination variables, should > it? Maybe provide a link to data and outpu

[R-sig-Geo] spatial interaction models

2010-10-01 Thread Carson Farmer
Hi List, This question has come up with the past, but I have yet to find a clear response, so I'm going to ask myself. Has anyone had much experience with spatial interaction models, specifically in the form of Poisson regression? I'm a bit unsure of how to operationalize this using glm(), and wou

Re: [R-sig-Geo] Snow depth raster for Finland

2010-09-22 Thread Carson Farmer
Hi Alex, The National Snow and Ice Data Centre has tonnes of data for snow, swe (snow water equivalent), and ice for most of the northern hemisphere: http://nsidc.org/index.html In particular, have a look at the Global Monthly EASE-Grid datasets. I think the go as far back as the 70s, though ther

Re: [R-sig-Geo] elegant way to processing several loops in the same time

2010-09-02 Thread Carson Farmer
Gianni, Have a look at the foreach package from REvolution Analytics. This lets you run each loop of a for loop on a separate processor. I used it for some bootstrapping work a while back and it works really nicely and simply: http://www.carsonfarmer.com/?p=668 Carson On 2 September 2010 15:23,

Re: [R-sig-Geo] error in python not load rpy, rpy2

2010-08-31 Thread Carson Farmer
You'll probably have more luck sending this query to the rpy mailing list: rpy-l...@lists.sourceforge.net http://rpy.sourceforge.net/maillist.html Carson On 31 August 2010 23:51, Ricardo Rodríguez wrote: > hi everyone, I have  a  error in load module of rpy and rpy2 in console of > python, how

Re: [R-sig-Geo] WKT to sp objects

2010-07-10 Thread Carson Farmer
ivand wrote: > On Sat, 10 Jul 2010, Carson Farmer wrote: > >> Hello list, >> >> Does anyone know of a nice way to convert WKT strings to sp Spatial >> objects? The list archives don't turn up anything conclusive beyond >> the possibility of doing it using rgeos,

[R-sig-Geo] WKT to sp objects

2010-07-10 Thread Carson Farmer
Hello list, Does anyone know of a nice way to convert WKT strings to sp Spatial objects? The list archives don't turn up anything conclusive beyond the possibility of doing it using rgeos, but I was wondering if anyone knew of a more 'stable', all R way of doing it? Thanks for any hints or though

Re: [R-sig-Geo] Raster:memory or disk?

2010-06-30 Thread Carson Farmer
Agus, What about using: > object.size(b) which (according to ?object.size) provides an estimate of the memory that is being used to store an R object. Carson On 30 June 2010 12:58, Agustin Lobo wrote: > Hi! > > Is there any way to check if the values of a raster object > are in memory or in d

Re: [R-sig-Geo] Querying Spatial Data Using rgdal

2010-05-18 Thread Carson Farmer
Just to bring this up again... > That only gets you so far. Could Tim please try ogr2ogr with the -sql or > -where or -spat arguments set to see whether these go in the correct > direction, that is returning geometries meeting the given selection > conditions? I have looked briefly at how hard it

Re: [R-sig-Geo] Help with Voronoi Tesselation

2010-05-14 Thread Carson Farmer
Does this help at all? http://www.carsonfarmer.com/?p=455 Carson On Fri, May 14, 2010 at 1:39 AM, Josef Fruehwald wrote: > Hi All, > > I'm somewhat of a novice at doing spatial analysis in R, so forgive me if my > question is obvious, or misposted. > > I have a number of points located within th

Re: [R-sig-Geo] Extract part(s) of SpatialPolygonsDataFrame

2010-05-13 Thread Carson Farmer
Hi, > I only need, for now, to work on two areas: Burgundy and Centre, > I would like to extract those two areas from the France file, > I tried, naïvely, > Centre <- France[France$NAME_1=="Centre", ] try: > Centre <- france[fra...@data$name_1=="Centre",] > PS: I found quite a lot of information

Re: [R-sig-Geo] Polygons from lines with open endings

2010-04-26 Thread Carson Farmer
> Since, I cannot manually close all endings, I would like to do find a way to > create polygons from lines with open endings. > Any suggestions ...? If your lines are valid (i.e. correctly ordered pairs of coords), you could probably just grab the first set of points in the list and add that to

Re: [R-sig-Geo] Shape to DB, DB to SpatialPolygon

2010-04-08 Thread Carson Farmer
Hi Germán, Have a look at package rgdal and the readOGR function. > library(rgdal) > ?readOGR Here is a link with a quick bit on using rgdal to access a postgis table: http://wiki.intamap.org/index.php/PostGIS Regards, Carson On Thu, Apr 8, 2010 at 11:21 AM, Germán Sánchez wrote: > Dear all,

Re: [R-sig-Geo] spatial clustering taking account of "value"

2010-03-10 Thread Carson Farmer
I may be misinterpreting your desired output, but could you not also perform LISA on this dataset? For example if you are interested in: >> highlight[ing] "clusters" (definition unclear!) where there >> are a number of points "close together" (definition unclear!) and the >> sum of all the values

Re: [R-sig-Geo] Rpy with ArcMap or Spatial Data

2010-02-16 Thread Carson Farmer
Hi Andrew, Shameless self promotion: Have a look at manageR (http://www.ftools.ca/manageR). It is available within the 3rd party repositories in QGIS (the gis it links with). If you have any questions regarding dependencies and installation, please don't hesitate to contact me off list. Regards,

Re: [R-sig-Geo] newbie questions

2009-11-16 Thread Carson Farmer
>... In addition, I use linux (Debian) and the desktop GIS tools that > I tried (svSig, Qgis, and some more) did not provide publication quality > maps. I would strongly suggest you take another look at some of these packages (especially QGIS). These are relatively young projects, and are growing

Re: [R-sig-Geo] Spatiotemporal data analysis

2009-10-28 Thread Carson Farmer
> For super low premiums, click here http://home.webmail.co.za/dd.pwm > > ___ > R-sig-Geo mailing list > R-sig-Geo@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- C

[R-sig-Geo] double stochastic weights matrix

2009-10-27 Thread Carson Farmer
-- Carson Farmer National Centre for Geocomputation John Hume Building, National University of Ireland, Maynooth, Maynooth, Co. Kildare, Ireland. www.carsonfarmer.com [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo

Re: [R-sig-Geo] Qgis-Rmanage and geographic display of spatial objects

2008-05-14 Thread Carson Farmer
Agustin Lobo wrote: Carson Farmer wrote: This is certainly where I would like to see manageR go someday! But unfortunately this would entail programming in C, which requires someone much more skilled than myself! For now I simply use it instead of jumping between the two applications... Your

Re: [R-sig-Geo] Qgis-user Digest, Vol 27, Issue 13

2008-05-13 Thread Carson Farmer
ke in GeoDa but with a real GIS diaplay... Great job! (I'm forwarding the r-sig-geo list just for them to know your developments) Agus Carson Farmer wrote: Agustin Lobo wrote: ok, just installed Rpy 1.0.3 (BTW, should I have uninstalled 1.02? how?) and manageR loads on qgis 0.10 on ubuntu

[R-sig-Geo] Spatially Constrained Clustering

2008-01-14 Thread Carson Farmer
Hello List, I am trying to find an R package that will accommodate spatially constrained clustering. While I have been unable to find a package that is explicitly designed to do spatially constrained clustering, I was wondering if anyone had found a package that would do constrained clusterin

[R-sig-Geo] problem with listw2sn...

2007-11-06 Thread Carson Farmer
e being lost at listw2sn. Note: I am running R 2.4.1 through the rpy python bindings in qgis (free open source gis). Carson Farmer Spatial Pattern Analysis & Research Lab (SPAR) Department of Geography, University of Victoria Victoria, BC, Canada web: www.geog.uvic.ca/spar email: [EMAI