emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Graham Smith <myotisone@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Babel - importing a data file- missing header row
Date: Tue, 8 Dec 2009 16:41:22 +0000	[thread overview]
Message-ID: <2c75873c0912080841j39a13a55t35c737be3455e211@mail.gmail.com> (raw)

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

             reply	other threads:[~2009-12-08 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 16:41 Graham Smith [this message]
2009-12-08 17:46 ` [babel] Babel - importing a data file- missing header row Dan Davison
2009-12-08 18:08   ` Graham Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c75873c0912080841j39a13a55t35c737be3455e211@mail.gmail.com \
    --to=myotisone@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).