|
From: | Thomas S. Dye |
Subject: | Re: [Orgmode] [Babel] - importing a data file- missing header row |
Date: | Tue, 8 Dec 2009 07:43:53 -1000 |
Hi Graham, On Dec 8, 2009, at 6:41 AM, Graham Smith wrote:
One solution would be to use a :session. Variables created in R will persist in the session and can be shared by source code blocks assigned to the :session. I don't have access to your data, but the following source code blocks should work for you. I've chosen to name the session 'woodland' but you can name it whatever you'd like, or not name it and use the default session. * Woodland Data - Create a variable woodland and populate it with BY4001WoodlandDataFinal.txt #+srcname:woodland #+begin_src R :session woodland woodland<-read.table("/home/graham/Dropbox/College/BY4001/WoodlandData/BY4001WoodlandDataFinal.txt",header=TRUE) #+end_src - Run some summary commands to see if the woodland variable looks right #+begin_src R :session woodland names(woodland) str(woodland) summary(woodland) #+end_src - Show the woodland data #+begin_src R :session woodland woodland #+end_src I like this approach because I don't have to save a bunch of R objects when I'm done. I just re-create them when I need them again, because the R code that I've already tested is saved with my org file. HTH, Tom |
[Prev in Thread] | Current Thread | [Next in Thread] |