Re: [R-sig-Geo] Random Movement Generator

2010-10-01 Thread Andy Bunn
> -Original Message- > From: r-sig-geo-boun...@stat.math.ethz.ch [mailto:r-sig-geo- > boun...@stat.math.ethz.ch] On Behalf Of Roberto Badilla Fuentes > Sent: Friday, October 01, 2010 12:42 PM > To: r-sig-geo > Subject: [R-sig-Geo] Random Movement Generator > > Hi All, > > Is there a funct

Re: [R-sig-Geo] drop layer/band from SpatialGridDataFrame

2010-08-10 Thread Andy Bunn
> -Original Message- > From: Matthew Landis [mailto:lan...@isciences.com] > Sent: Tuesday, August 10, 2010 12:56 PM > To: r-sig-geo@stat.math.ethz.ch; Andy Bunn > Subject: Re: [R-sig-Geo] drop layer/band from SpatialGridDataFrame > > Andy - how about these two

Re: [R-sig-Geo] drop layer/band from SpatialGridDataFrame

2010-08-10 Thread Andy Bunn
> -Original Message- > From: Michael Sumner [mailto:mdsum...@gmail.com] > Sent: Monday, August 09, 2010 11:28 PM > To: Andy Bunn > Cc: r-sig-geo@stat.math.ethz.ch > Subject: Re: [R-sig-Geo] drop layer/band from SpatialGridDataFrame > > Do you mean "layer&q

[R-sig-Geo] drop layer/band from SpatialGridDataFrame

2010-08-09 Thread Andy Bunn
I have a SpatialGridDataFrame with 325 variables in the @ data slot. I want to drop the first layer. Seems simple enough. Any help? Thanks, Andy > str(monthly.sp) Formal class 'SpatialGridDataFrame' [package "sp"] with 6 slots ..@ data :'data.frame': 8060 obs. of 325 variables: .. ..$

Re: [R-sig-Geo] SpatialGridDataFrame to netCDF via ncdf on Windows

2010-07-26 Thread Andy Bunn
> -Original Message- > From: Robert J. Hijmans [mailto:r.hijm...@gmail.com] > Sent: Friday, July 23, 2010 12:31 PM > To: Andy Bunn > Cc: r-sig-geo@stat.math.ethz.ch > Subject: Re: [R-sig-Geo] SpatialGridDataFrame to netCDF via ncdf on > Windows > > Andy, th

[R-sig-Geo] SpatialGridDataFrame to netCDF via ncdf on Windows

2010-07-23 Thread Andy Bunn
Hello, I have a series of a few dozen SpatialGridDataFrame objects that I would like to write as a single netCDF object - i.e., a 2D field (x,y) as a function of time (t) containing one time-varying variable (z). Given the example below I'd like to create one netCDF object containing t1 and t2.

Re: [R-sig-Geo] reading PRISM data from ftp [OT]

2006-06-22 Thread Andy Bunn
> Well, you dont say in what way it doesn't work. I get: > > > > download.file('ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/20 > 00-2009/us_tdmean_2004.01.gz',tmp) > trying URL > 'ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdm > ean_2004.01.gz' > Error in > download.f

[R-sig-Geo] reading PRISM data from ftp [OT]

2006-06-22 Thread Andy Bunn
Howdy again, This is a little off-topic for sig-geo, but I thought somebody might be able to help here easier than r-help. Can somebody please tel me why this works: tmp <- tempfile() download.file('ftp://ftp.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat',tmp) unlink(tmp) While this doesn't: tmp <

Re: [R-sig-Geo] Add lines from SpatialLinesDataFrame to an image of SpatialGridDataFrame

2006-06-22 Thread Andy Bunn
> On Thu, 22 Jun 2006, Andy Bunn wrote: > > > Howdy all: I have a simple question. Given two sp objects, a > > SpatialGridDataFrame tdmean and SpatialLinesDataFrame states I > want to plot > > tdmean as an image and draw the lines on top. Can this be done with sp? &

[R-sig-Geo] Add lines from SpatialLinesDataFrame to an image of SpatialGridDataFrame

2006-06-22 Thread Andy Bunn
Howdy all: I have a simple question. Given two sp objects, a SpatialGridDataFrame tdmean and SpatialLinesDataFrame states I want to plot tdmean as an image and draw the lines on top. Can this be done with sp? > class(tdmean) [1] "SpatialGridDataFrame" attr(,"package") [1] "sp" > is.projected(tdme

Re: [R-sig-Geo] masking z values (extract or subset on a 3-d array)

2006-05-27 Thread Andy Bunn
pply(foo[,'z',], function(x) max(c(x, 0))) > Thanks! -A >THK > >On 5/26/06, Andy Bunn <[EMAIL PROTECTED]> wrote: >> >> > > This is driving me nuts. I have a 3-D array that holds x,y,z >> > > coordinates from multiple experiments. I

Re: [R-sig-Geo] masking z values (extract or subset on a 3-d array)

2006-05-26 Thread Andy Bunn
> > This is driving me nuts. I have a 3-D array that holds x,y,z > > coordinates from multiple experiments. I need to clean the > data before > > making it sp objects. I want to set all z-values < 0 to 0. In a 2-D > > matrix this is trivial e.g., x[,x[1,]<0] <- 0. But I'm > stumped on how > >

[R-sig-Geo] masking z values (extract or subset on a 3-d array)

2006-05-26 Thread Andy Bunn
This is driving me nuts. I have a 3-D array that holds x,y,z coordinates from multiple experiments. I need to clean the data before making it sp objects. I want to set all z-values < 0 to 0. In a 2-D matrix this is trivial e.g., x[,x[1,]<0] <- 0. But I'm stumped on how to do this on a 3-D array wit

Re: [R-sig-Geo] write.asciigrid

2006-05-05 Thread Andy Bunn
> -Original Message- > From: Roger Bivand [mailto:[EMAIL PROTECTED] > Sent: Friday, May 05, 2006 12:29 PM > To: Andy Bunn > Cc: Zev Ross; r-sig-geo@stat.math.ethz.ch > Subject: RE: [R-sig-Geo] write.asciigrid > > > On Fri, 5 May 2006, Andy Bunn wrote:

Re: [R-sig-Geo] write.asciigrid

2006-05-05 Thread Andy Bunn
> > I second Roger's recommendation for using rgdal. I've been > writing to and > > fro from img files with few problems. The only problem I have > with ArcGIS is > > that the statistics have had to be recalculated in Arc for > floats to get the > > display to work correctly. But, Arc has a batch s

Re: [R-sig-Geo] write.asciigrid

2006-05-05 Thread Andy Bunn
I second Roger's recommendation for using rgdal. I've been writing to and fro from img files with few problems. The only problem I have with ArcGIS is that the statistics have had to be recalculated in Arc for floats to get the display to work correctly. But, Arc has a batch statistics tool that do

Re: [R-sig-Geo] (no subject); Clipping/Subsetting Sp objects (was no subject)

2006-04-07 Thread Andy Bunn
> -Original Message- > From: Edzer J. Pebesma [mailto:[EMAIL PROTECTED] > Sent: Friday, April 07, 2006 5:30 AM > To: Tim Keitt > Cc: Andy Bunn; r-sig-geo@stat.math.ethz.ch; [EMAIL PROTECTED] > Subject: Re: [R-sig-Geo] (no subject); Clipping/Subsetting Sp objects

[R-sig-Geo] Clipping/Subsetting Sp objects (was no subject)

2006-04-06 Thread Andy Bunn
Hi Tim, I'm reposting b/c I forgot to include a subject line before (fried). I'll revisit this tomorrow. Thx, -Andy -Original Message- From: Tim Keitt [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 5:19 PM To: Andy Bunn Cc: r-sig-geo@stat.math.ethz.ch Subject: Re:

[R-sig-Geo] (no subject)

2006-04-06 Thread Andy Bunn
List, I want to clip (subset) an sp object SpatialGridDataFrame using a polygon. For instance in this example I want to create a new object of class SpatialGridDataFrame that is clipped to the area inside the polygon on the map. data(meuse.grid) coordinates(meuse.grid) <- ~x+y gridded(meuse

[R-sig-Geo] Writing a tif using rgdal

2006-02-07 Thread Andy Bunn
Howdy List: I'm reading in a large number of satellite images and analyzing them in R. I know how to read a tif into R using rgdal and manipulate it. Is there a good way to write a new tif out using the projection data from the original? So in the example below how can I write out z as a jpg usin