[STATSGRASS] spatstat: trend to spatialgriddataframe - help needed
Jarekj Jasiewicz
jarekj at amu.edu.pl
Thu May 10 13:52:01 EDT 2007
Hi
It seems very simple but I cannot pass throuh one step:
I computed trend (ppm) in spatstat package:
ppm_2=ppm(unmark(pp), ~polynom(x,y,2))
next I found, that I can convert that object to "something almost
like <<im>> object" :
k=plot(ppm_2, ngrid=c(gmeta6()$cols, gmeta6()$rows),
superimpose=FALSE, how="image", pause=FALSE, plot.it=FALSE)
but: it is not im object. It is object which only contains im inside.
Here is its structure:
str(k)
List of 1
$ trend:List of 1
..$ :List of 11 ##here is something like "unnamed atribute" I
cannot pass this
.. ..$ v : num [1:986, 1:1051] 1.06e-09 1.07e-09 1.08e-09 1.10e-09
1.11e-09 ...
.. ..$ dim : int [1:2] 986 1051
.. ..$ xrange: num [1:2] 3684409 3713995
.. ..$ yrange: num [1:2] 5649780 5681325
.. ..$ xstep : num 28.2
.. ..$ ystep : num 32
.. ..$ xcol : num [1:1051] 3684423 3684451 3684479 3684507 3684535 ...
.. ..$ yrow : num [1:986] 5649796 5649828 5649860 5649892 5649924 ...
.. ..$ lev : NULL
.. ..$ type : chr "real"
.. ..$ units :List of 3
.. .. ..$ singular : chr "unit"
.. .. ..$ plural : chr "units"
.. .. ..$ multiplier: num 1
.. .. ..- attr(*, "class")= chr "units"
.. ..- attr(*, "class")= chr "im"
- attr(*, "class")= chr "plotppm"
- attr(*, "mrkvals")= num 1
I simply don't know how extract that part which is im object (to convert
it next to spatialgriddataframe) or even only v (v I can insert to any
im object and next to convert it)
I hope that problem is trivial to more advanced R users
Jarek
More information about the grass-stats
mailing list