I am trying to calculate the home range area using mcp.area from the
'adehabitat' package.
x<-c(689361,689041,689448,688871,688745,689302,690479,691284,689456,
689348,689438,689427,694824,689685,689871,689937,688933,689040,277847,
279256,279565,280644,280649,280653,280649,280232,280764)
y<-c(53
Hi Ned,
Function reclass() does this.
Jacob.
--- On Mon, 13/9/10, Ned Horning wrote:
From: Ned Horning
Subject: [R-sig-Geo] Apply a look-up table using Raster package
To: r-sig-geo@stat.math.ethz.ch
Date: Monday, 13 September, 2010, 22:16
Hi - Is it possible to modify a Raster layer using a
Hi - Is it possible to modify a Raster layer using a look-up table? I
have a data.frame object with data to map pixel values in a Raster layer
from one value to another but I'm not sure how to apply it. I tried to
be creative with setValues but didn't get too far.
All the best,
Ned
_
> >> If your data is in a data frame of coordinates x, y, (and maybe z),
> >> and variable W for all cells, and all your cells are the same size,
> >> then its just the weighted average of the coordinate (assuming your
> >> dataframe is the complete grid). So:
> >>
> >> xm = sum(d$x*d$W)/sum(d$W)
I like these suggestions as well
http://www1.maths.lth.se/help/R/RCC/
So for your function, combining the x and y coords into a single structure (
they are always paired so have a structure that reflects that )
dataToShape <- function( inputFileName, outputFileName, points, projection,
height)
I've been struggling with naming conventions as well.
having a style guide is important ( I say that now after having written way
too much
code without one)
Here's a start.. I bet there are other resources
http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
On Mon, Sep 13, 201
I see nothing wrong with the suggested names, they appear to be valid.
I would like to know how otheres deal with this, but I tend to keep
parameter names short and sweet with very little extra "finesse", e.g.
capital letters. I even try to avoid dots (I have them reserved for objects,
whereas cap
dear Researchers,
I am writing a function to improve my skills in R and make more elegant code
but I need a simple suggestion, because I am looking libraries to learn the
right syntax.
Is It correct to name the input file "Input" (with uppercase i) and Output
file "Output" or "filename"?
thanks G
Others have shown how to create your own palette, which is good general
information. But for your case you may be able to simply use the rev function
with heat.colors.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Ori
This is a great solution, thanks everyone!
-Ursprüngliche Nachricht-
Von: Robert J. Hijmans [mailto:r.hijm...@gmail.com]
Gesendet: Sonntag, 12. September 2010 23:18
An: Martin Brandt
Cc: r-sig-geo@stat.math.ethz.ch
Betreff: Re: [R-sig-Geo] mass importing rasters
You have not said what
10 matches
Mail list logo