emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel - importing a data file- missing header row
@ 2009-12-08 16:41 Graham Smith
  2009-12-08 17:46 ` [babel] " Dan Davison
  0 siblings, 1 reply; 3+ messages in thread
From: Graham Smith @ 2009-12-08 16:41 UTC (permalink / raw)
  To: emacs-orgmode

I need a bit of help importing a data file into orgmode/babel.

The import doesn't seem to know about having a header row

#+srcname:woodland
#+begin_src R
read.table("/home/graham/Dropbox/College/BY4001/WoodlandData/BY4001WoodlandDataFinal.txt",header=TRUE)
#+end_src

#+resname: woodland
| "V1.1"  | "v" | 0 | 0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 |  0 |  0 |
0 |  0 |  0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 | 0 |  0 | 0 | 0 |  0 |
0 |  0 | 0 |  0 |  5 |  0 |  0 | 10 |  0 | 0 |  0 | 100 |  0 |  3 | B


But strangely if I change the command and run the names(woodland)
after the import, I get a table of variable names but no data. I'm not
sure if the data is there but hidden as I can't get any commands to
work on the woodland object.

* Woodland Data
#+srcname:woodland
#+begin_src R
woodland<-read.table("/home/graham/Dropbox/College/BY4001/WoodlandData/BY4001WoodlandDataFinal.txt",header=TRUE)
names(woodland)
#+end_src

#+resname: woodland
| "ID"           |
| "wood"         |
| "Ajug.Rept"    |
| "Ange.sylv"    |
| "Brac.sylv"    |
| "Brom.ramo"    |
| "Care.pend"    |
| "Care.remo"    |
| "Care.sylv"    |
| "Cirs.palu"    |
| "Cory.avel"    |
| "Desc.caes"    |
| "Dryo.fili"    |
| "Endy.non"     |
| "Euph.amyg"    |

So it seems I already need some more help.

Graham

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

end of thread, other threads:[~2009-12-08 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-08 16:41 Babel - importing a data file- missing header row Graham Smith
2009-12-08 17:46 ` [babel] " Dan Davison
2009-12-08 18:08   ` Graham Smith

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