[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Babel - importing a data file- missing header row
From: |
Graham Smith |
Subject: |
[Orgmode] Babel - importing a data file- missing header row |
Date: |
Tue, 8 Dec 2009 16:41:22 +0000 |
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
- [Orgmode] Babel - importing a data file- missing header row,
Graham Smith <=