From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graham Smith Subject: Babel - importing a data file- missing header row Date: Tue, 8 Dec 2009 16:41:22 +0000 Message-ID: <2c75873c0912080841j39a13a55t35c737be3455e211@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NI37y-0008JL-PV for emacs-orgmode@gnu.org; Tue, 08 Dec 2009 11:41:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NI37u-0008H5-1m for emacs-orgmode@gnu.org; Tue, 08 Dec 2009 11:41:30 -0500 Received: from [199.232.76.173] (port=37046 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NI37t-0008Gy-Rp for emacs-orgmode@gnu.org; Tue, 08 Dec 2009 11:41:25 -0500 Received: from mail-fx0-f213.google.com ([209.85.220.213]:38464) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NI37t-0005RT-HM for emacs-orgmode@gnu.org; Tue, 08 Dec 2009 11:41:25 -0500 Received: by fxm5 with SMTP id 5so5833190fxm.8 for ; Tue, 08 Dec 2009 08:41:23 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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