&key isn't valid?

This commit is contained in:
2025-05-11 22:04:45 -04:00
parent e5b0de99e2
commit a2beb6635a

View File

@@ -23,25 +23,18 @@
;;; Code:
(defun pt-build (source &key rows cols vals)
(defun pt-build (source &rest params)
"Build a pivot table
The SOURCE value should be the table the data is being taken
from. ROWS and COLS should be lists of column references from
the source table to be used as rows and columns for the pivot
table. These can either be integers representing the column
number, or strings representing column names.
VALUES should be a list containing information about the values
in the body of the pivot table. Each element of the list should
be in the following format (REF FUNC &optional LABEL).
TODO: more documentation"
(let ((col-index (pt-get-columns source))
(index (pt-column-names source))
src-cols
(src-body (pt-get-body source))
(buckets (make-hash-table)))
(let* ((rows (assoc :rows params))
(cols (assoc :cols params))
(vals (assoc :vals params))
(col-index (pt-get-columns source))
(index (pt-column-names source))
src-cols
(src-body (pt-get-body source))
(buckets (make-hash-table)))
(pt--index-columns rows)
(pt--index-columns cols)
(pt--index-columns vals car)