emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] left aligned changes to right alignment in table after adding one ro


From: Rainer M Krug
Subject: [O] left aligned changes to right alignment in table after adding one row - possible bug?
Date: Mon, 13 Oct 2014 12:43:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)

#+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: pgpKqIppdLIiZ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]