cpelley / iris

A powerful, easy to use, and community-driven Python library for analysing and visualising meteorological and oceanographic data sets.
http://scitools.org.uk/iris/
0 stars 0 forks source link

Develope interface to rpy2 for iris #5

Open cpelley opened 11 years ago

cpelley commented 11 years ago

Requirement: Convert between iris cubes/coordinates and 'r' data types. https://github.com/cpelley/iris/tree/rpy2_interface

Background: http://www.statmethods.net/input/datatypes.html http://en.wikibooks.org/wiki/R_Programming/Data_types http://rpy.sourceforge.net/rpy2_documentation.html

Suitable objects for cube translation (minimum loss of metadata): DataFrames, Matrices, Arrays? All three can have row-column labels which could be associated with dim coordinates)

numeric/character/logical vector Matrices - All columns in a matrix must have the same mode(numeric, character, etc.) and the same length. Arrays - Arrays are similar to matrices but can have more than two dimensions. DataFrames - A data frame is more general than a matrix, in that different columns can have different modes (numeric, character, factor, etc.). Lists - An ordered collection of objects (components). A list allows you to gather a variety of (possibly unrelated) objects under one name.

Matrices/arrays/dataframes: cube representation in its simplest single object form. Lists: cube representation with the possibility of maintaining more metadata.

cpelley commented 11 years ago

Additional points:

  1. Handling dates by mean of setting appropriate strings which represent dates.
  2. Handling missing data.