From 51e9d41504777cec5b9631fbd4991a751268d916 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Sun, 12 Jul 2009 18:19:30 +0200 Subject: [PATCH] documentation and preparation for statistical-oriented access and views. Signed-off-by: AJ Rossini --- src/data/dataframe-xarray.lisp | 7 +++++-- src/data/dataframe.lisp | 24 +++++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/data/dataframe-xarray.lisp b/src/data/dataframe-xarray.lisp index 0696ddf..1034059 100644 --- a/src/data/dataframe-xarray.lisp +++ b/src/data/dataframe-xarray.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-07-05 02:08:15 tony> +;;; Time-stamp: <2009-07-12 08:05:27 tony> ;;; Creation: <2009-06-22 17:09:47 tony> ;;; File: dataframe-xarray.lisp ;;; Author: AJ Rossini @@ -27,7 +27,10 @@ (defmethod xref ((obj matrix-like) &rest indices)) (defmethod xtype ((obj dataframe-like)) - "Unlike the standard xtype, here we need to return a vector of the types.") + "Unlike the standard xtype, here we need to return a vector of the + types. Vectors can have single types, but arrays have single type. + Dataframe-like have multiple types, variable-like single type, + case-like has multiple types, and matrix-like has single type.") (defmethod xdims ((obj dataframe-like)) (dataframe-dimensions obj)) diff --git a/src/data/dataframe.lisp b/src/data/dataframe.lisp index 9bd58de..5b38e37 100644 --- a/src/data/dataframe.lisp +++ b/src/data/dataframe.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-06-25 09:22:48 tony> +;;; Time-stamp: <2009-07-12 08:20:42 tony> ;;; Creation: <2008-03-12 17:18:42 blindglobe@gmail.com> ;;; File: dataframe.lisp ;;; Author: AJ Rossini @@ -542,3 +542,25 @@ structure." (testecase 'asdf) (testecase 'as) |# + + +;;; Vector-like generalizations: we consider observation-like and +;;; variable-like to be abstract classes which provide row and column +;;; access to dataframe structures. These will be specialized, in +;;; that rows correspond to an observation (or case?) which are +;;; multitype, while columns correspond to a variable, which must be +;;; singularly typed. + +(defclass observation-like (dataframe-like) + () + (:documentation "dataframe-like with only 1 row, is an observation-like.")) + +(defclass variable-like (dataframe-like) + () + (:documentation "dataframe-like with only 1 column is a variable-like.")) + +;;; Need to implement views, i.e. dataframe-view-like, +;;; observation-view-like, variable-view-like. + +;;; Need to consider read-only variants, leveraging the xref +;;; strategy. \ No newline at end of file -- 2.11.4.GIT