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

No applicable method for generic function column-length when given data-frame #26

Closed tetrazolium closed 7 months ago

tetrazolium commented 8 months ago

Hello, I'm trying to run lisp-stat on linux, in SBCL 2.4.0 with quicklisp 2021-02-13 and asdf 3.3.1. I'm trying to run the example labeled "Simple Bar Chart" in the plotting examples of the docs. When I try to run

(ql:quickload :lisp-stat)
(ql:quickload :plot/vega)
(plot:plot
 (vega:defplot simple-bar-chart
   `(:mark :bar
     :data (:values ,(plist-df '(:a #(A B C D E F G H I)
                                 :b #(28 55 43 91 81 53 19 87 52))))
     :encoding (:x (:field :a :type :nominal :axis ("labelAngle" 0))
                :y (:field :b :type :quantitative)))))

I get the error:

There is no applicable method for the generic function
  #<STANDARD-GENERIC-FUNCTION DATA-FRAME::COLUMN-LENGTH (1)>
when called with arguments
  (#<DATA-FRAME (9 observations of 2 variables)>).
   [Condition of type SB-PCL::NO-APPLICABLE-METHOD-ERROR]

I'm still new to common lisp, so I'm wondering if it's something with my environment that's different? Since I don't see a method for data-frame here on github either

snunez1 commented 8 months ago

Are you running this from the LS-USER package? Seems as if the namespace isn't set up properly. Also, what OS are you running on?

(As an aside, usage questions like this are best sent to the mailing list or stackoverflow, where there are more people monitoring; here it's just devs).

tetrazolium commented 8 months ago

Oh yes, I'm using ls-user with (in-package :ls-user). It still gives me the same error on Arch Linux.

snunez1 commented 7 months ago

Update quicklisp. 2021 is a long time ago for lisp-stat.

I can't reproduce this, stepping though each step on the example page. Try updating Quicklisp and/or take the code from the github repos.

snunez1 commented 7 months ago

Any update on this?

tetrazolium commented 7 months ago

Quicklisp's client is version 2021. Quicklisp itself is version 2023-10-21. Both should be the most up to date version. I tried cloning from github and running it, but when I do that instead of using quicklisp I get the error that

Component "smoothers" not found, required by
#<SYSTEM "plot/vega">
    [Condition of type ASDF/FIND-COMPONENT:MISSING-DEPENDENCY]

(ql:quickload 'smoothers) doesn't find it, so I'm not certain of where I would go from here.

snunez1 commented 7 months ago

Quicklisp has been slow to update in recent years. It's a one-man volunteer effort, and I guess we all have our up and down periods in life. Try cloning https://github.com/Lisp-Stat/smoothers

tetrazolium commented 7 months ago

Okay, that fixed the problem for me, and the example is running fine now. Thanks!