[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Update the value of specific column using the values of other column
From: |
Emanuel Berg |
Subject: |
Re: Update the value of specific column using the values of other columns on-the-fly. |
Date: |
Sat, 26 Dec 2020 13:52:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hongyi Zhao wrote:
> I want to edit a table with 5 columns, where the first
> column is calculated from the other columns as below:
>
> val_col1 = 20% * val_col2 + 30% * val_col3 + 40% * val_col4 + 10% * val_col5
>
> I want to let emacs update the column 1, i.e., the weighted
> mean result of other columns automatically and on the fly
> when I input the values for other columns.
>
> Is this possible with emacs? Any hints will be
> highly appreciated.
There is the Emacs spreadsheet, of course.
Or do it in Lisp.
But then in Lispp (Lisp and only Lisp), i.e., 100% code,
because reading column values back and forth in a buffer -
that is soo fragile... use the spreadsheet for that, that's
why it's there!
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal