From 64bfaa2bdda7aad816eece35a3feaabecdb51ff9 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Mon, 30 Mar 2009 08:16:29 +0200 Subject: [PATCH] printing sort of works, good enough for now. One more example in TODO for printing. Signed-off-by: AJ Rossini --- TODO.lisp | 4 ++-- src/data/data-clos.lisp | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/TODO.lisp b/TODO.lisp index 5964aba..39f4f75 100644 --- a/TODO.lisp +++ b/TODO.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-03-27 17:11:12 tony> +;;; Time-stamp: <2009-03-30 07:55:08 tony> ;;; Creation: <2008-09-08 08:06:30 tony> ;;; File: TODO.lisp ;;; Author: AJ Rossini @@ -60,7 +60,7 @@ (make-dataframe #2A((1 2 3 4 5) (10 20 30 40 50))) - (make-dataframe (rand 6 3)) + (make-dataframe (rand 4 3)) (defparameter *my-df-1* (make-dataframe #2A((1 2 3 4 5) diff --git a/src/data/data-clos.lisp b/src/data/data-clos.lisp index e7dd031..2ea4e17 100644 --- a/src/data/data-clos.lisp +++ b/src/data/data-clos.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-03-27 17:03:01 tony> +;;; Time-stamp: <2009-03-30 08:14:12 tony> ;;; Creation: <2008-03-12 17:18:42 blindglobe@gmail.com> ;;; File: data-clos.lisp ;;; Author: AJ Rossini @@ -489,16 +489,18 @@ type = sequence, vector, vector-like (if valid numeric type) or dataframe." (format stream " ~d x ~d" (nrows object) (ncols object)) (terpri stream) ;; (format stream "~T ~{~S ~T~}" (var-labels object)) - (dotimes (j (ncols object)) + (dotimes (j (ncols object)) ; print labels (write-char #\tab stream) - (format stream "~A~T" (nth j (var-labels object)))) - (dotimes (i (nrows object)) + (write-char #\tab stream) + (format stream "~T~A~T" (nth j (var-labels object)))) + (dotimes (i (nrows object)) ; print obs row (terpri stream) (format stream "~A:~T" (nth i (case-labels object))) (dotimes (j (ncols object)) - ;; (write-char #\space stream) - (write-char #\tab stream) - (write (dfref object i j) :stream stream))))) + (write-char #\tab stream) ; (write-char #\space stream) + ;; (write (dfref object i j) :stream stream) + (format stream "~7,3E" (dfref object i j)) ; if works, need to include a general output mechanism control + )))) #| (defun print-structure-relational (ds) -- 2.11.4.GIT