From 1e7991d200b85ba9dfbf217a88909b0e46c58d36 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Wed, 3 Oct 2007 20:45:45 +0200 Subject: [PATCH] fixed data, init, and ls-user --- data.lisp | 34 +++++++++++----------------------- init.lisp | 1 + ls-user.lisp | 2 +- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/data.lisp b/data.lisp index b930191..ac9d657 100644 --- a/data.lisp +++ b/data.lisp @@ -209,39 +209,27 @@ Reads the data in FILE as COLS columns and returns a list of lists representing (transpose (split-list (read-data-file file) cols)))) -;;; FIXME:AJR: ALL THE FOLLOWING ARE SOLVED BY PLATFORM-INDEP PATHNAME WORK! +;;; FIXME:AJR: ALL THE FOLLOWING NEED TO BE SOLVED BY PLATFORM-INDEP PATHNAME WORK! +;;; FIXME:AJR: use either string or pathname. + +(defun path-string-to-path (p s) + (pathname (concatenate 'string (namestring p) s))) -#+unix (defun load-data (file) -"Args: (file) +"Args: (file) as string Read in data file from the data examples library." - (if (load (format nil "~aData/~a" *default-path* file)) + (if (load (path-string-to-path *lispstat-data-dir* file)) t - (load (format nil "~aExamples/~a" *default-path* file)))) + (load (path-string-to-path *lispstat-examples-dir* file)))) -#+unix (defun load-example (file) -"Args: (file) + "Args: (file) as string Read in lisp example file from the examples library." - (if (load (format nil "~aExamples/~a" *default-path* file)) + (if (load (path-string-to-path *lispstat-examples-dir* file)) t - (load (format nil "~aData/~a" *default-path* file)))) -#+macintosh -(defun load-data (s) (require s (concatenate 'string ":Data:" s))) -#+macintosh -(defun load-example (s) (require s (concatenate 'string ":Examples:" s))) + (load (path-string-to-path *lispstat-data-dir* file)))) -#+msdos -(defun load-data (file) -"Args: (file) -Read in data file from the data examples library." - (load (format nil "~aData\\~a" *default-path* file))) -#+msdos -(defun load-example (file) -"Args: (file) -Read in lisp example file from the examples library." - (load (format nil "~aExamples\\~a" *default-path* file))) ;;;; ;;;; Listing and Saving Variables and Functions diff --git a/init.lisp b/init.lisp index bcae7a5..04f0b57 100644 --- a/init.lisp +++ b/init.lisp @@ -39,6 +39,7 @@ (ls-defdir *lispstat-asdf-dir* "ASDF/") (ls-defdir *lispstat-data-dir* "data/") (ls-defdir *lispstat-external-dir* "external/") + (ls-defdir *lispstat-examples-dir* "examples/") ;; Load ASDF if it isn't loaded #-asdf(load (pathname (concatenate 'string (namestring *lispstat-external-dir*) "asdf"))) diff --git a/ls-user.lisp b/ls-user.lisp index fa15566..abdf13e 100644 --- a/ls-user.lisp +++ b/ls-user.lisp @@ -56,7 +56,7 @@ should be packaged up elsewhere for reproducibility.") ;;; regression, bayesian regression via laplace approximation, etc. ;;; The following could be considered "core packages", similar to the -;;; idea of a recommended set. +;;; idea of the recommended packages in R. ;; regression.lsp regression-model regression-model-proto x y intercept sweep-matrix -- 2.11.4.GIT