For a table I would like to convert the first column from decimal numbers to binary. The table looks so far like this:
| . | . | . | . | . |
| . | . | . | . | . |
| . | . | . | . | . |
| 1304 | 24 | 9 | 15 | 5 |
| 1305 | 25 | 10 | 15 | 5 |
| 1306 | 26 | 11 | 15 | 5 |
| 1307 | 27 | 12 | 15 | 5 |
| 1308 | 28 | 13 | 15 | 5 |
| 1309 | 29 | 14 | 15 | 5 |
| 1310 | 30 | 15 | 15 | 5 |
| 1311 | 31 | 16 | 15 | 5 |
| 1312 | 32 | 17 | 15 | 5 |
| 1313 | 33 | 18 | 15 | 5 |
For the conversion I found already a working function:
(defun binList(N)
(cond
((< N 1) '())
((= N 1) '(1))
((> N 1) (if(=(mod N 2) 0)
(append (binList(/ N 2)) '(0))
(append (binList(floor(/ N 2))) '(1))))))
When I want to apply the TBLFM
+TBLFM: $1='(binList $1)
i just get errors ( I tried also to convert the 2. column and write into the first)
| . | . | . | . | . |
| . | . | . | . | . |
| . | . | . | . | . |
| #ERROR | 24 | 9 | 15 | 5 |
| #ERROR | 25 | 10 | 15 | 5 |
| #ERROR | 26 | 11 | 15 | 5 |
| #ERROR | 27 | 12 | 15 | 5 |
| #ERROR | 28 | 13 | 15 | 5 |
| #ERROR | 29 | 14 | 15 | 5 |
| #ERROR | 30 | 15 | 15 | 5 |
| #ERROR | 31 | 16 | 15 | 5 |
| #ERROR | 32 | 17 | 15 | 5 |
| #ERROR | 33 | 18 | 15 | 5 |
are there some further steps needed/ in between ?