[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: return column from table as a column

From: Juan Manuel Macías
Subject: Re: return column from table as a column
Date: Fri, 13 Aug 2021 17:12:46 +0000

Hello Roger,

Roger Mason writes:

> Thank you, I think I may be able to get this to work.

You're welcome. Just a minor fix: although the code works fine,
naturally the asterisk in `let' was unnecessary. This is a new version
with the code explained, in case you find it useful:

#+begin_src emacs-lisp :var data=s1 col=3
  (let* (
         ;; return a list from elemens in column number `col'
         (list-from-column (mapcar (lambda (r) (format "%s" (nth col r))) data))
         ;; make a list of lists = a new table that contains one single column
         (new-table (mapcar 'list list-from-column)))


Juan Manuel 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]