[GRASSLIST:2220] Re: converting GRASS data for trend surface analysis i n R
Roger Bivand
Roger.Bivand at nhh.no
Wed Jan 14 13:46:25 EST 2004
> Hello all
>
> I'm trying to do some trend surface analysis with GRASS data in R, but I
> with some problems:
>
> 1 - when I get the raster from GRASS, surf.ls() doesn't accept it, since
> its not in x,y,z format:
>
>> str(isobase)
> List of 1
> $ isobases.auto: num [1:241266] 771 770 769 768 767 ...
>>
>
> So, how can I change this to a format that surf.ls() understands?
>
isobase$isobases.auto is the z argument. You can generate the x by east()
of the object returned by gmeta(), and y by north() of this object. I'm
not sure how well surf.ls() scales to this number of points, though.
> 2 - I'll try several degrees of surfaces, so I'll use surf.ls(), but
> what about residuals? can I get them with residuals()?
>
Yes, residuals() should work. Again, scaling to this number of points is
an issue. On the other hand, the residuals and fitted values will drop
straight into the GRASS location.
Roger
> thanks in advance
>
> Carlos Grohmann
>
> --
> +-------------------------------------------------+
> Carlos Henrique Grohmann - Guano
> Geologist - MSc Student at IGc-USP - Brazil
> Linux User #89721 ICQ: 214752832
> +-------------------------------------------------+
--
Roger Bivand
NHH, Breiviksveien 40, N-5045 Bergen, Norway
More information about the grass-user
mailing list