[R-sig-Geo] metatdata

Roger Bivand Roger.Bivand at nhh.no
Mon Nov 9 09:29:08 CET 2009


On Mon, 9 Nov 2009, Agustin Lobo wrote:

> Hi!
> Is anyone thinking on designing metadata for R spatial objects?
> I've seen there are metadata facilities in Bioconductor for genomics,
> perhaps we could get some inspiration from them?

You are welcome to try, naturally. The S3 data.frame object on which they 
are based has no such facility built in. comment() can be used to set and 
get metadata on arbitrary objects, such as S3 data.frame and *lm fit 
objects. Sometimes modifications on that object will inherit the comment 
attribute, sometimes not. The S language metadata system is called 
history(), really - saving journals allows analyses to be reconstructed. I 
don't know anyone who updated comments manually. But comment() could be 
used to add metadata to the data.frame in the data slot, with it being up 
to the user to set and update this.

Bioconductor metadata is most often calibration data that are used in 
analysis rather than a lineage paper-trail, I believe. Then it does make 
sense to package two kinds of data - the calibration metadata and 
observations made with that instrument, by giving each set of 
observations a pointer to the appropriate calibration constants.

Timestamping of R objects has been discussed on R lists many times without 
any change being introduced - the processing and storage overheads were 
seen as too large to make sense. So the current recommendation is to use 
comment() updated manually. It seems to work on Spatial* objects, even 
though attributes (like the comment) are S3 and slots (the contents of the 
object) are S4.

In fact the Spatial class in some ways is the minimal metadata for the 
Spatial* family - a bounding box and a coordinate reference system. These 
are consistently updated for all operations on the family, and the history 
mechanism is used for lineage.

Hope this helps,

Roger

>
> Agus
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
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 R-sig-Geo mailing list