Re: [R-sig-Geo] 'krige' messages in loops

2008-12-12 Thread James Nylen
Adding either of these two arguments to the function call works for me: set=list(debug=0) debug.level=0 The second one was mentioned in ?krige and is probably a little easier to remember. -James On Fri, Dec 12, 2008 at 10:54 AM, Edzer Pebesma < edzer.pebe...@uni-muenster.de> wrote: > Maurici

Re: [R-sig-Geo] numeric fields imported as factors by readOGR()

2008-12-05 Thread James Nylen
This happens to me as well. I just create a new column in the shapefile object's data, like: shp$AreaNum = as.numeric(as.vector(shp$AREA)) If all you want to know is "why is it coded this way" then I have no idea, sorry. -James On Fri, Dec 5, 2008 at 10:29 AM, Agustin Lobo <[EMAIL PROTECTED]>

Re: [R-sig-Geo] upload waypoint data to Garmin GPS

2008-11-17 Thread James Nylen
The easiest thing to do is probably to write the data.frame to a tab-delimited text file using write.table and then read in the written file like you have done above. See ?write.table - as I recall there are plenty of options that will allow you to specify the separator, whether or not to write he

Re: [R-sig-Geo] help to Improve "elegant" code

2008-10-20 Thread James Nylen
Follow the technique that your code already uses (a for() loop to iterate over a series of values, and a paste() function to generate the filename). To be more specific: for(method in 1:3) { ### here, insert the code you posted ## but change: # paste("DCM_1_power", i+14, ".sgrd", sep="") ## to #

Re: [R-sig-Geo] Res: Problem with points.geodata and plot.geodata

2008-10-20 Thread James Nylen
In that case, you could always try stacking the panels vertically instead of horizontally? If this is even possible with the function you are using. Or just plot each panel to an image and superimpose them using another method? I've done things like that where I had R create PNG images and then c

Re: [R-sig-Geo] R: R: suggestion to write a more elegant code

2008-10-16 Thread James Nylen
On Thu, Oct 16, 2008 at 8:23 PM, Alessandro <[EMAIL PROTECTED]>wrote: > It's Run > > > power<- seq(1.5, 4.0, by=0.1) > for (i in 1:length(power)){ > rsaga.grid.calculus(in.grids = c("DCM_1.sgrd"), > out.grid = paste("DCM_1_power",i,".sgrd",sep=""), > formula = paste("a^",po

Re: [R-sig-Geo] convert data.frame into raster image

2008-10-08 Thread James Nylen
ewhat. -James Nylen On Wed, Oct 8, 2008 at 5:52 AM, Alexandre VILLERS < [EMAIL PROTECTED]> wrote: > Good afternoon (even if it might be morning or evening for some of you), > > The question might appear ordinary. > I have a large dataset where such dataframe is repeated >

Re: [R-sig-Geo] How to remove polygons according to their attributes?

2008-09-05 Thread James Nylen
In the past I have encountered numerical shapefile attributes stored as factors, not numbers. So you would have to make the following change to Friderike's code to select by area: require(rgdal) Ctries=readOGR(dsn='C:/data/datasets/HornOfAfrica', layer='HornOfAfrica', p4s=NULL) str([EMAIL PROTECT