* Mean of a column in a remote table
@ 2018-12-13 12:42 Roger Mason
2018-12-13 13:23 ` Eric S Fraga
2018-12-13 13:24 ` Eric S Fraga
0 siblings, 2 replies; 6+ messages in thread
From: Roger Mason @ 2018-12-13 12:42 UTC (permalink / raw)
To: Org-Mode
Hello,
I _think_ this question has a simple answer, but I cannot find it.
I need the mean of a column in a remote table. My current attempt looks
like this:
| Data | a |
|-------------------+-------|
| mic_2_in_648_cell | |
#+tblfm: $2=remote($1,vmean(@2..@-1))
#+name: mic_2_in_648_cell
| a |
|-----------|
| 28.886207 |
| 28.900981 |
| 28.886101 |
| 28.900659 |
| 28.900526 |
| 28.886694 |
| 28.886559 |
| 28.90024 |
| 28.900524 |
| 28.900583 |
| 28.886496 |
The second column of the upper table is intended to receive the mean of
table 'mic_2_in_648_cell'. Instead I get the error 'Row descriptor -1
leads outside table'.
This is a cut down example that captures the essence.
Thanks for any help.
Roger
GNU Emacs 26.1 (build 1, i386-portbld-freebsd11.2, GTK+ Version 3.22.29)
Org mode version 9.1.13 (release_9.1.13-784-ged7d1d @ /home/rmason/.emacs.d/org-git/lisp/)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mean of a column in a remote table
2018-12-13 12:42 Mean of a column in a remote table Roger Mason
@ 2018-12-13 13:23 ` Eric S Fraga
2018-12-13 13:24 ` Eric S Fraga
1 sibling, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2018-12-13 13:23 UTC (permalink / raw)
To: Roger Mason; +Cc: Org-Mode
On Thursday, 13 Dec 2018 at 09:12, Roger Mason wrote:
> #+tblfm: $2=remote($1,vmean(@2..@-1))
[...]
> The second column of the upper table is intended to receive the mean of
> table 'mic_2_in_648_cell'. Instead I get the error 'Row descriptor -1
> leads outside table'.
Try @< instead of @-1?
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1034-gafcb1d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mean of a column in a remote table
2018-12-13 12:42 Mean of a column in a remote table Roger Mason
2018-12-13 13:23 ` Eric S Fraga
@ 2018-12-13 13:24 ` Eric S Fraga
2018-12-13 14:08 ` Roger Mason
1 sibling, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2018-12-13 13:24 UTC (permalink / raw)
To: Roger Mason; +Cc: Org-Mode
That should have been @>, not @<.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1034-gafcb1d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mean of a column in a remote table
2018-12-13 13:24 ` Eric S Fraga
@ 2018-12-13 14:08 ` Roger Mason
2018-12-13 16:14 ` Eric S Fraga
0 siblings, 1 reply; 6+ messages in thread
From: Roger Mason @ 2018-12-13 14:08 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Roger Mason, Org-Mode
Hello Eric,
Eric S Fraga <esflists@gmail.com> writes:
> That should have been @>, not @<.
| Data | a |
|-------------------+--------|
| mic_2_in_648_cell | #ERROR |
#+tblfm: $2=remote($1,vmean(@2..@>))
and 'Cells in the region copied, use M-x org-table-paste-rectangle to
paste them in a table.' in the Message buffer.
Thanks,
Roger
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mean of a column in a remote table
2018-12-13 14:08 ` Roger Mason
@ 2018-12-13 16:14 ` Eric S Fraga
2018-12-13 18:24 ` Roger Mason
0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2018-12-13 16:14 UTC (permalink / raw)
To: Roger Mason; +Cc: Org-Mode
On Thursday, 13 Dec 2018 at 10:38, Roger Mason wrote:
> Hello Eric,
>
> Eric S Fraga <esflists@gmail.com> writes:
>
>> That should have been @>, not @<.
>
> | Data | a |
> |-------------------+--------|
> | mic_2_in_648_cell | #ERROR |
>
> #+tblfm: $2=remote($1,vmean(@2..@>))
>
> and 'Cells in the region copied, use M-x org-table-paste-rectangle to
> paste them in a table.' in the Message buffer.
Umm, I think you want to do the mean of the remote entries so try:
vmean(remote($1,@2..@>)) but I also wonder whether you need to specify
the column as well for remote references? At least, when I have done
this, I have specified both rows and columns,
e.g. vmean(remote(xxx,@<$>..@>$>)).
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1034-gafcb1d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Mean of a column in a remote table
2018-12-13 16:14 ` Eric S Fraga
@ 2018-12-13 18:24 ` Roger Mason
0 siblings, 0 replies; 6+ messages in thread
From: Roger Mason @ 2018-12-13 18:24 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Roger Mason, Org-Mode
Hello Eric,
Eric S Fraga <esflists@gmail.com> writes:
> Umm, I think you want to do the mean of the remote entries so try:
> vmean(remote($1,@2..@>)) but I also wonder whether you need to specify
> the column as well for remote references? At least, when I have done
> this, I have specified both rows and columns,
> e.g. vmean(remote(xxx,@<$>..@>$>)).
Yes! That was it.
Many thanks for your help.
Roger
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-12-13 18:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13 12:42 Mean of a column in a remote table Roger Mason
2018-12-13 13:23 ` Eric S Fraga
2018-12-13 13:24 ` Eric S Fraga
2018-12-13 14:08 ` Roger Mason
2018-12-13 16:14 ` Eric S Fraga
2018-12-13 18:24 ` Roger Mason
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.