From: Rainer M Krug <Rainer@krugs.de>
To: emacs-orgmode@gnu.org
Subject: left aligned changes to right alignment in table after adding one row - possible bug?
Date: Mon, 13 Oct 2014 12:43:29 +0200 [thread overview]
Message-ID: <m238asp7vy.fsf@krugs.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 3869 bytes --]
#+PROPERTY: header-args :exports both
* Changing alignment when one row is added
Despite of all values are strings, the alignment changes in the below
example. Is this a bug or am I missing something?
Thanks,
Rainer
** Here it works
The column pm and pb are left aligned as expected for strings (correct?).
#+begin_src R :colnames yes :rownames yes
x <- structure(c("-1.358", "-1.957", "-1.752", "-1.773", "-1.886",
"-1.948", "-1.754", "-1.730", "-1.859", "-1.900", "4.757", "5.708",
"5.419", "5.408", "5.493", "5.581", "5.250", "5.193", "5.329",
"5.396", "", "*0.000 *** *", "*0.034 **", "0.411", "*0.002 ***",
"0.376", "0.055 .", "0.134", "*0.012 **", "0.243", "", "*0.000 *** *",
"0.072 .", "0.833", "0.228", "0.549", "0.061 .", "0.756", "0.128",
"0.916", "", "*0.000 *** *", "*0.048 **", "0.938", "0.389", "0.640",
"*0.044 **", "0.598", "0.217", "0.941"), .Dim = c(10L, 5L), .Dimnames = list(
c("Quercus robur - single", "Quercus robur - 95", "Quercus robur - 90",
"Quercus robur - 85", "Quercus robur - 80", "Quercus robur - 75",
"Quercus robur - 70", "Quercus robur - 65", "Quercus robur - 60",
"Quercus robur - 55"), c("slope", "intercept", "p", "pm",
"pb")))
head(x, 5)
#+end_src
#+RESULTS:
| | slope | intercept | p | pm | pb |
|------------------------+--------+-----------+--------------+--------------+--------------|
| Quercus robur - single | -1.358 | 4.757 | | | |
| Quercus robur - 95 | -1.957 | 5.708 | *0.000 *** * | *0.000 *** * | *0.000 *** * |
| Quercus robur - 90 | -1.752 | 5.419 | *0.034 ** | 0.072 . | *0.048 ** |
| Quercus robur - 85 | -1.773 | 5.408 | 0.411 | 0.833 | 0.938 |
| Quercus robur - 80 | -1.886 | 5.493 | *0.002 *** | 0.228 | 0.389 |
** Here it doesn't
By adding row 6, pm and pb become right aligned. This can also be
reproduced by only using columns 5:7 (~x[5:7,]~ instead of ~head(x,6)~).
#+begin_src R :colnames yes :rownames yes
x <- structure(c("-1.358", "-1.957", "-1.752", "-1.773", "-1.886",
"-1.948", "-1.754", "-1.730", "-1.859", "-1.900", "4.757", "5.708",
"5.419", "5.408", "5.493", "5.581", "5.250", "5.193", "5.329",
"5.396", "", "*0.000 *** *", "*0.034 **", "0.411", "*0.002 ***",
"0.376", "0.055 .", "0.134", "*0.012 **", "0.243", "", "*0.000 *** *",
"0.072 .", "0.833", "0.228", "0.549", "0.061 .", "0.756", "0.128",
"0.916", "", "*0.000 *** *", "*0.048 **", "0.938", "0.389", "0.640",
"*0.044 **", "0.598", "0.217", "0.941"), .Dim = c(10L, 5L), .Dimnames = list(
c("Quercus robur - single", "Quercus robur - 95", "Quercus robur - 90",
"Quercus robur - 85", "Quercus robur - 80", "Quercus robur - 75",
"Quercus robur - 70", "Quercus robur - 65", "Quercus robur - 60",
"Quercus robur - 55"), c("slope", "intercept", "p", "pm",
"pb")))
head(x, 6)
#+end_src
#+RESULTS:
| | slope | intercept | p | pm | pb |
|------------------------+--------+-----------+--------------+--------------+--------------|
| Quercus robur - single | -1.358 | 4.757 | | | |
| Quercus robur - 95 | -1.957 | 5.708 | *0.000 *** * | *0.000 *** * | *0.000 *** * |
| Quercus robur - 90 | -1.752 | 5.419 | *0.034 ** | 0.072 . | *0.048 ** |
| Quercus robur - 85 | -1.773 | 5.408 | 0.411 | 0.833 | 0.938 |
| Quercus robur - 80 | -1.886 | 5.493 | *0.002 *** | 0.228 | 0.389 |
| Quercus robur - 75 | -1.948 | 5.581 | 0.376 | 0.549 | 0.64 |
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
next reply other threads:[~2014-10-13 10:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 10:43 Rainer M Krug [this message]
2014-10-13 16:55 ` left aligned changes to right alignment in table after adding one row - possible bug? Charles Berry
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=m238asp7vy.fsf@krugs.de \
--to=rainer@krugs.de \
--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).