[R] a geographical factor
Rolf Turner
r.turner at auckland.ac.nz
Sat Mar 1 04:23:03 CET 2014
I'm too lazy to figure out the details of what you are trying to do, but
I think it is possible that you might find the facilities of the
spatstat package useful and that these might save you some
wheel-reinvention. Look in particular at the quadrats(), tess() and
im() functions.
cheers,
Rolf Turner
On 01/03/14 13:40, Bill wrote:
> Hi. I have a dataframe called radSamp
>
> which looks like this:
>
>> head(radSamp[,c(3,4,5)])
> Latitude Longitude Value
> 1 39.16094 140.4883 45
> 2 32.84428 -117.2240 47
> 3 35.80605 139.3789 28
> 4 35.07816 -106.6123 50
> 5 35.83174 136.2027 35
> 6 34.78944 137.9496 32
>
> This is radiation data from the area around Fukushima, Japan.
> I want to partition this region into about 40x40 rectangles. I think that
> if I can create a factor f consisting of these 1600 rectangles then I can
> focus on what is happening in each of these rectangles by
> using split(radSamp$Value, f).
> The area I want to focus on is defined by the following 4 corners of a
> rectangle:
>
> ~Akita
> Lat = 39 degrees, 41.4 minutes North
> Long = 137 degrees, 10.1 minutes East
>
>
> East of Akita
> Lat = 39 degrees, 41.4 minutes North
> Long = 141 degrees, 57.5 minutes East
>
> ~Toyama
> Lat = 36 degrees, 42.2 minutes North
> Long = 137 degrees, 10.1 minutes East
>
> East of Toyama
> Lat = 36 degrees, 42.2 minutes North
> Long = 141 degrees, 57.5 minutes East
>
> Can anyone suggest how to create such a factor?
More information about the R-help
mailing list