New comment-annotated example.
[CommonLispStat.git] / example.lisp
blob0ace6dd441750523e2c0f1d046d3a88342c4bc97
1 ;; example of possible usage.
4 ;; Load system
5 (ql:quickload "cls")
7 ;; use the example package...
8 (in-package :cls-user)
11 ;; or better yet, create a package/namespace for the particular problem being attacked.
12 (defpackage :my-package-user
13 (:documentation "demo of how to put serious work should be placed in
14 a similar package elsewhere for reproducibility. This hints as to
15 what needs to be done for a user- or analysis-package.")
16 (:nicknames :my-clswork-user)
17 (:use :common-lisp ; always needed for user playgrounds!
18 :lisp-matrix
19 :common-lisp-statistics
20 :lisp-stat-data-examples) ;; this ensures access to a data package
21 (:shadowing-import-from :lisp-stat call-method call-next-method
23 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
24 asin acos atan sinh cosh tanh asinh acosh atanh float random
25 truncate floor ceiling round minusp zerop plusp evenp oddp
26 < <= = /= >= > > ;; complex
27 conjugate realpart imagpart phase
28 min max logand logior logxor lognot ffloor fceiling
29 ftruncate fround signum cis
31 <= float imagpart))
33 (in-package :my-clswork-user)
35 ;; create some data by hand
37 (setf testdata)