emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug in org-table-convert-region?
Date: Tue, 28 May 2013 00:59:45 +0200	[thread overview]
Message-ID: <87vc64vxjy.fsf@gmail.com> (raw)


Hi List,

using 'M-: (org-table-convert-region beg end 2) on this output (with
beg/end being the points before and after the tabular data)

,-------------------------------------------------------------------
| === Error on training data ===
|
| Correctly Classified Instances         147               98      %
| Incorrectly Classified Instances         3                2      %
| Kappa statistic                          0.97
| Mean absolute error                      0.0233
| Root mean squared error                  0.108
| Relative absolute error                  5.2482 %
| Root relative squared error             22.9089 %
| Total Number of Instances              150
`-------------------------------------------------------------------

I get what I want:

| Correctly Classified Instances   |       144 | 96 | % |
| Incorrectly Classified Instances |         6 |  4 | % |
| Kappa statistic                  |      0.94 |    |   |
| Mean absolute error              |     0.035 |    |   |
| Root mean squared error          |    0.1586 |    |   |
| Relative absolute error          |  7.8705 % |    |   |
| Root relative squared error      | 33.6353 % |    |   |
| Total Number of Instances        |       150 |    |   |


However, using 'C-u 2 M-x org-table-convert-region' on the marked region
yields this:

| Correctly   | Classified | Instances |       144 |      96 | % |
| Incorrectly | Classified | Instances |         6 |       4 | % |
| Kappa       | statistic  | 0.94      |           |         |   |
| Mean        | absolute   | error     |     0.035 |         |   |
| Root        | mean       | squared   |     error |  0.1586 |   |
| Relative    | absolute   | error     |    7.8705 |       % |   |
| Root        | relative   | squared   |     error | 33.6353 | % |
| Total       | Number     | of        | Instances |     150 |   |

From the comment-string:

,-----------------------------------------------------------------------
| (org-table-convert-region BEG0 END0 &optional SEPARATOR)
|
| Convert region to a table.[...]
| SEPARATOR specifies the field separator in the lines.  It can have the
| following values:
|
| '(4)     Use the comma as a field separator
| '(16)    Use a TAB as field separator
| integer  When a number, use that many spaces as field separator
| nil      When nil, the command tries to be smart and figure out the
`-----------------------------------------------------------------------

and from the elisp manual:

,-----------------------------------------------------------------------
| Here are the results of calling display-prefix with various raw prefix
| arguments:
|
|      C-u     M-x display-prefix  -| (4)
|
|      C-u C-u M-x display-prefix  -| (16)
|
|      C-u 3   M-x display-prefix  -| 3
`-----------------------------------------------------------------------

Looks like a bug in the argument handling?

--
cheers,
Thorsten

             reply	other threads:[~2013-05-27 23:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 22:59 Thorsten Jolitz [this message]
2013-05-28  7:17 ` Bug in org-table-convert-region? Sebastien Vauban
2013-05-28  9:03   ` Thorsten Jolitz
2013-05-28  9:28     ` Sebastien Vauban
2013-05-28 10:20       ` Thorsten Jolitz
2013-05-28 11:47         ` [PATCH] org-table-convert-region (was Re: Bug in org-table-convert-region?) Thorsten Jolitz
2013-06-01  5:46           ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vc64vxjy.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).