Hi Brian,
My guess is that it goes wrong when this happens:
which.max(c(NA,NA))
Try something like this instead:
func - function (x) {
if(all(is.na(x))) {result - 0
} else {result - which.max(x)}
return(result)
}
Best,
Jacob.
--- On Tue, 9/11/10, Brian Oney zenli...@gmail.com wrote:
Dear all,
I was wondering if there is an easy way to generate coordinates of
clustered spatial point pattern.(possibly with variations on the degree
of aggregation).
So far one can easily generate random patterns (splancs: csr; sp:
spsample) or regular (sp: spsample or some simple lines of
Hi Matevž,
If I understand you correctly and your goal is to conduct a
spatial analysis of the variables of parent material, and particle size
e.g. clay, based on depth you will first need to make some decisions on how
to classify your data based on depth. Then you could create a 2d raster
Dear Listers,
I have a list (list.of.files) of file names (character vector) with n number
of elements.
List of 9
$ 1: chr [1:5] binned_walker1_1.grd ...
$ 2: chr [1:2] binned_walker2_1.grd ...
$ 3: chr [1:3] binned_walker3_1.grd ...
$ 4: chr [1:6] binned_walker4_1.grd ...
$ 5: chr
Hi,
Or, you could include additional variables into the model structure that
describe vertical patterns. If you choose to do this, then it would also be
wise to account for correlation between observations with depth and in space.
Assuming that you can describe your response variable with some
thank you for your suggestion!
--
Regards,
Mahalakshmi
Graduate Student
#20, Department of Geography
Michigan State University
East Lansing, MI 48824 Quoting Ben Madin li...@remoteinformation.com.au:
Maha,
On 08/11/2010, at 5:20 PM, govin...@msu.edu wrote:
Thanks for the info. I got my
The example from the documentation for nbdists() uses two predefined
objects (columbus and col.gal.nb), so it's not clear to me how
coordinates are being matched (see below)
library(spdep)
example(columbus)
coords - coordinates(columbus)
dlist - nbdists(col.gal.nb, coords)
Does nbdists() match
On Tue, 9 Nov 2010, Lee Hachadoorian wrote:
The example from the documentation for nbdists() uses two predefined
objects (columbus and col.gal.nb), so it's not clear to me how
coordinates are being matched (see below)
library(spdep)
example(columbus)
coords - coordinates(columbus)
dlist -
Thanks! it worked great.
Much appreciated.
Brian
On 11/8/2010 5:44 PM, Jacob van Etten wrote:
Oops, the function should of course be something like this:
func - function(x)
{
from - c(12,1:11)[x[13]]
to - c(2:12,1)[x[13]]
return(sum(x[c(from,x[13],to)]))
}
--- On *Mon,
On 10/11/2010, at 7:21 AM, Roger Bivand wrote:
On Tue, 9 Nov 2010, Patrick Giraudoux wrote:
Dear all,
I was wondering if there is an easy way to generate coordinates of clustered
spatial point pattern.(possibly with variations on the degree of
aggregation).
So far one can easily
On 11/09/2010 02:12 PM, Roger Bivand wrote:
On Tue, 9 Nov 2010, Lee Hachadoorian wrote:
The example from the documentation for nbdists() uses two predefined
objects (columbus and col.gal.nb), so it's not clear to me how
coordinates are being matched (see below)
Good question. None of these
On 11/09/2010 09:05 PM, Lee Hachadoorian wrote:
On 11/09/2010 02:12 PM, Roger Bivand wrote:
On Tue, 9 Nov 2010, Lee Hachadoorian wrote:
The example from the documentation for nbdists() uses two predefined
objects (columbus and col.gal.nb), so it's not clear to me how
coordinates are
On Tue, 09 Nov 2010 21:19:45 +0100, Edzer Pebesma wrote:
On 11/09/2010 09:05 PM, Lee Hachadoorian wrote:
row.names(spdf) = as.character(spdf$key_field) sp = as(spdf,
SpatialPolygons)
row.names(df) = df$key_field
spdfNew = SpatialPolygonsDataFrame(sp, df, match.ID = TRUE)
It would be
On 11/09/2010 10:03 PM, Lee Hachadoorian wrote:
On Tue, 09 Nov 2010 21:19:45 +0100, Edzer Pebesma wrote:
On 11/09/2010 09:05 PM, Lee Hachadoorian wrote:
row.names(spdf) = as.character(spdf$key_field) sp = as(spdf,
SpatialPolygons)
row.names(df) = df$key_field
spdfNew =
Bastien,
The way it currently works with Byte type files is that all values
below zero become zero, and all values = 255 become NA. That, is 255
is the missing value flag
What is clearly wrong, is that NA (and NaN) become zero, rather than
NA. I can solve this in raster, but it seems that is
On Tue, 09 Nov 2010 22:12:25 +0100, Edzer Pebesma wrote:
You're right of course, sorry for the misunderstanding, I meant to say
to modify sp such that ... works
My bad, sorry for replying with the obvious.
--Lee
--
Lee Hachadoorian
PhD Student, Geography
Program in Earth Environmental
Hi Brian,
This:
avg - overlay(mon_stac, fun=maxmonth)
does not work because overlay requires multiple (at least 2) Raster
objects. In your case RasterLayer objects
avg - overlay(a, b, c, etc... , fun=maxmonth)
An alternative would be to use the list of RasterLayers in the
RasterStack and
17 matches
Mail list logo