similar to: Rasterize function with maximum in R

Displaying 20 results from an estimated 4000 matches similar to: "Rasterize function with maximum in R"

2018 Jun 01
1
rasterize SpatialPolygon object using a RasterBrick object
I am trying to rasterize a SpatialPolygon object by a RasterBrick object. The documentation of the raster::rasterize function explicitly says this is allowed. Here's what I am doing # load the raster package library("raster") # create a raster brick object using the example from the brick function documentation b <- brick(system.file("external/rlogo.grd",
2013 Apr 12
1
produce a map in ARCGIS from a GAM output
Hi, I am trying to predict the habitat suitability of lobster with GAMs. I need to produce a map in ArcGis of the predicted densities. I did some search and the function predict.gam seems to do the job. Is this the right way to do it? when you apply the function you get the predicted values (different from your input data points) but I do not understand what is the procedure with the spatial
2017 Jun 21
4
How to apply a system of ordinary differential equations to a cell grid?
Hello, I am developing an agent-based model to simulate the spread of infectious diseases in heterogeneous landscapes composed of habitat polygons (or clumps of connected cells). To simplify the model, I consider a habitat grid (or raster) containing the polygon ID of each cell. In addition, I have epidemiological parameters associated with each polygon ID. At each time step, the parameter values
2017 Sep 25
0
build a SpatialLines object from a list
Hi Ashraf, It is not obvious to me what your structures are but one problem in your function is the assignment tt1 <- SpatialLines(list(tt[[i]])). This will set tt1 to just have one item. Consider the following test.func <- function(x) { tt1 <- list() for ( i in ... ) { ... tt1[[i]] <- SpatialLines(tt[[i]]) } return(tt1) } HTH, Eric On Mon, Sep 25,
2017 Sep 26
2
build a SpatialLines object from a list
Hi Eric, Thanks for the help.But this will not solve the problem as it will generate a list and what I need is an object of class sp using SpatialLine function from sp package.So, I need to convert each matrix to coordinates and then to a line and then to a spatial line as figured in the code. My data structure is a list of 141 matrices.Each matrix represents coordinates of the river lines
2011 Feb 09
0
adehabitatMA, LT, HR and HS version 0.1
Dear all, I have just uploaded 4 new packages on CRAN, which are on the long term designed to replace the "old" package adehabitat: * adehabitatMA: functions to perform spatial operations (morphology, buffer, etc.) * adehabitatHS: functions for the analysis of habitat selection by wildlife * adehabitatHR: functions for home range estimation of animals * adehabitatLT: functions for
2011 Feb 09
0
adehabitatMA, LT, HR and HS version 0.1
Dear all, I have just uploaded 4 new packages on CRAN, which are on the long term designed to replace the "old" package adehabitat: * adehabitatMA: functions to perform spatial operations (morphology, buffer, etc.) * adehabitatHS: functions for the analysis of habitat selection by wildlife * adehabitatHR: functions for home range estimation of animals * adehabitatLT: functions for
2016 Apr 30
0
Could not find function "pointsToRaster"
Hi, A terrific resource for this type of issue (and pretty much anything related to R) is http://rseek.org/ I'm sure I use it at least daily. Check out ... http://rseek.org/?q=pointsToRaster The first hit is about pointsToRaster() - it has been replaced by raster::rasterize() Cheers, Ben > On Apr 30, 2016, at 4:28 AM, Ogbos Okike <giftedlife2014 at gmail.com> wrote: > >
2009 May 09
0
clump of binary pixels on raster
Dear all, I have a set od 30,000 binary landscapes, which represent habitat and non-habitat cover. I need to generate images that identify those neighbour (rule 8) pixels as one patch ID, and a different patch ID for each clump of pixels. I coded it using labcon(adehabitat), but as some of my landscapes have so many patches, labcon not finish and entry in a eternal looping. By other side, I coded
2008 Apr 04
2
Reading an ArcGIS raster file
Dear members, How can I read and plot an ArcGIS raster file into R ? The file has extension .aux and contains floating point bathymetry data. The purpose is to create a spatial model in R that uses ArcGIS map data. I have managed to read and plot various shape files into my R project, but I am stuck with this now. I am new to this list and also to R, so any help would be much appreciated. Many
2011 Sep 29
1
How to Code Random Nested Variables within Two-way Fixed Model in lmer or lme
Hi All, I am frustrated by mixed-effects model! I have searched the web for hours, and found lots on the nested anova, but nothing useful on my specific case, which is: a random factor (C) is nested within one of the fixed-factors (A), and a second fixed factor (B) is crossed with the first fixed factor: C/A A B A x B My question: I have a functioning model using the aov command (see
2013 Jan 29
2
Netcdf and Raster Package Questions, Need .asc File for GIS
Hello R-Group, I am new working with netcdf files and the raster package in R.I am trying to read in a netcdf file using the package "ncdf".I am able to get the lat, lon and parameter I need and can plot using fill.contour.Ultimately, I am trying to create a .asc file to reafd into GIS.I am using the package "raster" to read the parameter.When I read in with
2012 Jul 07
4
replacement has length zero
I have been working on the following code but keep getting an err message. My current thinking is that the problem is on the indexing but do not know how to fix it. Any help please? ungulate <- read.csv("Ungulate.csv",row.names=1) ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL habitat <- read.csv("Ungulate_vegetation.csv")
2002 Jul 11
2
Nested anovas in R not doing what they ought to...
Hi, there I first sent this e-mail a couple months ago, to no avail.Since I am not a member on your mailing list, so could you please cc: a response to me? I'll be sure to check the list today for replies. I am currently attempting to perform an ANOVA with both nested and normal factors. My problem is that R is treating my nested factors the exact same way as it would interaction terms.
2012 Oct 26
1
Openbugs- Array Index
Hi, I'm working on the codes below however every time I run them when they get to OpenBUGS I keep getting the error message: array index is greater than array upper bound for hab. Any help would be greatly appreciated, Suzie Codes: ungulate <- read.csv(file.choose ()) #ungulate ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL
2006 Jun 08
2
nested mixed-effect model: variance components
Dear listers, I am trying to assess variance components for a nested, mixed-effects model. I think I got an answer that make sense from R, but I have a warning message and I wanted to check that what I am looking at is actually what I need: my data are organized as transects within stations, stations within habitats, habitats within lagoons. lagoons: random, habitats: fixed the question is:
2009 May 29
1
data manipulation involving aggregate
hi all, I often have a data frame like this example data.frame(sq=c(1,1,1,2,2,3,3,3,3),area=c(1,2,3,1,2,3,1,2,3),habitat=c("garden","garden","pond","field","garden","river","garden","field","field")) for each "sq" I have multiple "habitat"s each with an associated "area". I
2018 May 16
1
Raster extract by polygon generating NAs
Greetings! I'm using the extract command (raster package) with a raster layer (x) and a spatial polygons dataframe (y). I'm using it to extract the sum of raster values by each spatial polygon. However, I'm getting NAs as a result for some polygon IDs, which I know isn't true because that doesn't happen in ArcGIS. Does anyone experienced the same issue? Thanks! Joao
2010 Oct 21
2
nested anova
Hello all, Can any of you R gurus help me out? I?m not all that great at stats to begin with, and I?m also learning the R ropes (former SAS user). Here?s what I need help with? I have a nested sample design and ran a nested anova, but I don?t know how to interpret the results habitat (four different types) is nested in site (three types), and site is nested in gear (two types)
2020 Mar 24
2
raster/brick abre imagen pero reescala valores pixeles
Hola, No tengo mucha idea de esto y hace tiempo que no lo uso. Unas ideas: - ¿Puedes hacer un summary(prueba) para ver si los datos que tienes dentro del raster son los que te está representado? Eso te permitirá saber si el problema esta en raster() o en plot() - Puede que al hacer plot() te haga categorías en lugar de asignar un color para cada valor, igual el parámetro col de plot() te ayuda. -