[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel, bug?] colnames with a list of columns does not work
From: |
Thomas S. Dye |
Subject: |
Re: [O] [babel, bug?] colnames with a list of columns does not work |
Date: |
Thu, 22 Jan 2015 05:37:34 -1000 |
Aloha Seb,
I don't think babel knows anything about objects created within source
code blocks. I think you'll have to set the column names yourself,
within the R source code block.
All the best,
Tom
Sebastien Vauban <sva-news-D0wtAvR13HarG/address@hidden>
writes:
> Hello,
>
> The following ECM shows it all:
>
> #+begin_src R :rownames yes :colnames '(Lg Nb)
> data(iris)
> head(table(iris$Petal.Length, iris$Species)[, "setosa"])
> #+end_src
>
> returns:
>
> | | x |
> |-----+----|
> | 1 | 1 |
> | 1.1 | 1 |
> | 1.2 | 2 |
> | 1.3 | 7 |
> | 1.4 | 13 |
> | 1.5 | 13 |
>
> while I was expecting:
>
> | Lg | Nb |
> |-----+----|
> | 1 | 1 |
> | 1.1 | 1 |
> | 1.2 | 2 |
> | 1.3 | 7 |
> | 1.4 | 13 |
> | 1.5 | 13 |
>
> Am I missing something?
>
> Best regards,
> Seb
--
Thomas S. Dye
http://www.tsdye.com