emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org tables into R?
@ 2015-01-02 19:57 Michael Gauland
  2015-01-02 20:13 ` Andreas Leha
  2015-01-04  3:19 ` Michael Gauland
  0 siblings, 2 replies; 17+ messages in thread
From: Michael Gauland @ 2015-01-02 19:57 UTC (permalink / raw)
  To: emacs-orgmode

I want to use an R block to manipulate data from an org table, but I'm not
getting what I expect. 

If I define a table like this:

  #+NAME: data
  |   A |   B |  C |
  |-----+-----+----|
  | 115 |  76 | 60 |
  | 124 |  78 | 55 |
  | 118 |  73 | 65 |
  | 114 |  75 | 61 |
  | 108 |  74 | 82 |

and pass it into R like this:

  #+BEGIN_SRC R :results output :exports both :session :var data.table=data
  names(data.table)
  head(data.table)
  #+END_SRC

I expect to get a table with three columns ("A", "B", and C"), but instead I
seem to get a single column named "A.B.C":

  #+RESULTS:
  : [1] "A.B.C"
  :       A.B.C
  : 1 115 76 60
  : 2 124 78 55
  : 3 118 73 65
  : 4 114 75 61
  : 5 108 74 82


What am I doing wrong?

Thanks,
Michael Gauland

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-01-07 14:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-02 19:57 org tables into R? Michael Gauland
2015-01-02 20:13 ` Andreas Leha
2015-01-02 22:45   ` Vikas Rawal
2015-01-04 10:01     ` Andreas Leha
2015-01-05  0:10       ` Aaron Ecay
2015-01-05 11:48         ` Nicolas Goaziou
2015-01-06  4:27           ` Aaron Ecay
2015-01-06 23:08             ` Nicolas Goaziou
2015-01-06 23:17               ` Aaron Ecay
2015-01-06 23:38                 ` Nicolas Goaziou
2015-01-06 10:14           ` Andreas Leha
2015-01-06 11:02             ` Rainer M Krug
2015-01-06 12:07               ` Andreas Leha
2015-01-06 13:37                 ` Rainer M Krug
2015-01-06 17:49                   ` Aaron Ecay
2015-01-07  9:01                     ` Rainer M Krug
2015-01-04  3:19 ` Michael Gauland

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).