Nevil,
You can use the freq function. After running the example I gave you can do
sapply(lst, freq)
or
freq(s[[1]])
freq(s[[2]])
etc.
(which is equivalent to table(values(s[[1]])) etc.)
Robert
On Tue, Sep 6, 2011 at 7:20 PM, Nevil Amos wrote:
> Thanks
> the second thing the Region Grou
On 06/09/11 01:13, Alper ALTINOK wrote:
I appreciate for the advices, let me explain the situation a bit more with
another example;
Say, points are representing sampled fields for pests. Imagine you are making
samplings from tomato fields to reveal possible clusters (hotspots) of pests,
in a
Thanks
the second thing the Region Group does is to count the number of cells
in each contiguous area can I also acheive this in Raster?
On 7/09/2011 10:48 AM, Robert J. Hijmans wrote:
> Nevil,
> The function 'clump' in 'raster' does this for a single value and
> perhaps you can use it in a lo
Nevil,
The function 'clump' in 'raster' does this for a single value and perhaps
you can use it in a loop over all values to achieve what you are after.
Robert
library(raster)
r <- raster(ncol=10, nrow=10)
r[] <- round(runif(100)*3)
u <- unique(r)
lst <- list()
for (i in 1:length(u)) {
x <- r==u[i
On Tue, 6 Sep 2011, Moritz Lennert wrote:
Hello,
I have a very simple problem, which I know will have a simple solution, but I
just can't get my head wrapped around it.
I have a shapefile with regions, including an attribut containing a regional
id.
I would like to extract a simple neighb
Hi Roger and Terry,
Thank you very much for your help and directing me towards Roger's spdep
package, which of course had everything I needed. I've now worked through
this code and done some additional simulations.
I have one remaining question. You say "the larger the distance threshold,
the les
Thanks for making that crystal clear.
For the moment, I will probably stick to FWtools to make my conversions, but
I hope I will have time to learn how to build gdal from source including the
drivers I need.
Thanks again,
Arnaud
2011/9/4 Roger Bivand
> On Sat, 3 Sep 2011, Arnaud Mosnier wrote:
I'm using a Generalized Linear Model from the[R]- GLM package to do
Regression Kriging in GSTAT. I was wondering if there is a way to
calculate a 'leave one out cross validation' for the GLM model only? For
the Regression Kriging I do it like that: ## rk.cv <-
krige.cv((SAND)~om.glm, boden.ov,
Hello,
I have a very simple problem, which I know will have a simple solution,
but I just can't get my head wrapped around it.
I have a shapefile with regions, including an attribut containing a
regional id.
I would like to extract a simple neighbourhood file, with neighbourhood
defined by
This question has been asked here before. Which distribution are you using?
If you are using debian or ubuntu the admin should install
libgdal1-dev for building gdal. I also recommend installing r-base-dev
if it is not yet installed. It is needed for building most R packages
If the administrator
Hi Yung-wei,
I had simislar Problems when first isntalling rgdal on my machine. It is
due to missing (Linux-)Packages, that R needs to compile its bindings
with gdal.
In my case ( on a Ubuntu System) the required packages where: gdal-bin,
libgdal1-dev, libproj-dev, build-essential. There migh
11 matches
Mail list logo