Lisp-Stat / data-frame

Data frames for Common Lisp
https://lisp-stat.github.io/data-frame
Microsoft Public License
28 stars 4 forks source link

Data Frame - summarize-columns example #10

Closed JARS3N closed 2 years ago

JARS3N commented 2 years ago

in https://lisp-stat.dev/docs/getting-started/data-frame/ documentation

(asdf:load-system :lisp-stat) (in-package :ls-user) (defdf mtcars (read-csv rdata:mtcars)) (summarize-column 'mtcars:mpg)

`The value

(21 21 22.8d0 21.4d0 18.7d0 18.1d0 14.3d0 24.4d0 22.8d0

19.2d0 17.8d0 16.4d0 17.3d0 15.2d0 10.4d0 10.4d0 14.7d0
32.4d0 30.4d0 33.9d0 21.5d0 15.5d0 15.2d0 13.3d0 19.2d0
27.3d0 26 30.4d0 15.8d0 19.7d0 15 21.4d0)

is not of type SYMBOL [Condition of type TYPE-ERROR]

Restarts: 0: [RETRY] Retry SLIME REPL evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {25C391B1}>)

Backtrace: 0: (DATA-FRAME::SUMMARIZE-GENERIC-VARIABLE #(21 21 22.8d0 21.4d0 18.7d0 18.1d0 ...)) 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SUMMARIZE-COLUMN (QUOTE MTCARS:MPG)) #) 2: (EVAL (SUMMARIZE-COLUMN (QUOTE MTCARS:MPG))) --more--`

Symbolics commented 2 years ago

To make this work, you can use the 'augmented' version of the mtcars data set. You can do that with (load #P"LS:DATASETS;ls-mtcars").

Dropping into the debugger when you don't have the extra information isn't what we want though, so I'll have to look into this and add some checks.