[GRASS-stats] Raster maps from GRASS to R and back to GRASS?

Roger Bivand Roger.Bivand at nhh.no
Tue Apr 14 02:14:40 EDT 2009


On Tue, 14 Apr 2009, Nikos Alexandris wrote:

>
> Nikos:
>>>> What I actually do is nothing but a PCA on a combination of different
>>>> bands. The fact is that bands a, b, c are of equal "length" in R and
>>>> have _more_ non-NULLs than bands d, e, f.
> [...]
>
>
> Dylan:
>>> One thing you might consider is generating a single NULL mask that represents
>>> NULL values that occur in any, or all bands -- akin to an OR operation. I
>>> think that na.omit(sp_object at data) may be able to return just the 'complete'
>>> data, along with a list of indices where NA values have been removed.
>
>
> Roger:
>> Would simply using complete.cases(x at data) be what you are looking for?
>
>
> So, this is the _correct and easy_ way instead of using a couple of |
> (=OR) operators in my case? Or am I misinterpreting it?

Yes, this is the most direct way to choose the subset of a data.frame with 
complete cases - used in lots of places that data.frame objects are used 
(since 1992, White Book). Think data.frame objects, not GIS objects 
(bands). This is about ontology, really.

Roger

>
> Kindest regards, Nikos
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the grass-stats mailing list