emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dan Davison <davison@stats.ox.ac.uk>
To: Graham Smith <myotisone@gmail.com>
Cc: emacs org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: org-R tutorial on Worg
Date: Thu, 5 Feb 2009 09:58:42 -0500	[thread overview]
Message-ID: <20090205145842.GB7611@stats.ox.ac.uk> (raw)
In-Reply-To: <2c75873c0902050004s7da4353gbc5f2efcfe71253@mail.gmail.com>

On Thu, Feb 05, 2009 at 08:04:11AM +0000, Graham Smith wrote:
> Dan,
> 
> I'm working through the tutorial and not got very far :-(
> 
> #+TBLNAME:continuous-data
> |                   |
> |-------------------|
> | -4.76347066844695 |
> | -1.83010300550287 |
> | -3.62646358009839 |
> | -3.06483847781371 |
> | -3.29886543850004 |
> | -3.33136718271076 |
> | -2.92393768071614 |
> | -1.81447109443947 |
> | -2.77876256693823 |
> | -3.04428187935138 |
> |  2.68011061127436 |
> |   3.8462031281076 |
> |  3.26010701204355 |
> |  3.13388406902156 |
> |  2.64108043612206 |
> |  2.79307900174277 |
> |  2.63510171209823 |
> | 0.382633073598201 |
> |  1.36106585545773 |
> |  3.15710034712042 |
> #+RR: x<-c(rnorm(10, mean=-3, sd=1), rnorm(10, mean=3, sd=1))
> #+R: title:"continuous-data" output-to-buffer:t
> 
> [[file:tmp.png][histogram example]]
> #+R: action:hist columns:1 colour:hotpink
> #+R: intable:continuous-data outfile:"png" title:"histogram example"
> 
> This is cut and pasted from Emacs and when I run org-R I get and error:
> 
> "before first headline at position 975 in buffer RorgTest.org"
> 
> 
> Have you any suggestions ?

outfile:"png" specifies that you want png output saved to a file in
the org-attach dir for the current entry. However, I think that your
table is not in an entry (i.e. there is no heading in the file
above). So org-attach complains. I think in this case this is
appropriate behaviour, rather than a bug.

So, make sure that you are working in an org entry, by adding a
heading above the table, e.g.


* org-R histogram example
#+TBLNAME:continuous-data
|                   |
|-------------------|
| -3.06521250484893 |
| -3.85900568302554 |
| -2.31281550717715 |
| -2.69410857795684 |
| -2.54226178999743 |
| -3.02282932827444 |
| -3.39871174816189 |
| -2.91887758977056 |
| -3.05343781967347 |
| -2.76498552588994 |
|  1.46406677150374 |
|  2.45199818968135 |
|  1.40791932601955 |
|  1.29757561821086 |
|  2.48973905577704 |
|  2.69374921012632 |
|  2.39647207311083 |
|  3.21737310446711 |
|  1.22693189766015 |
|  2.37953000571237 |
#+RR: x<-c(rnorm(10, mean=-3, sd=1), rnorm(10, mean=3, sd=1))
#+R: title:"continuous-data" output-to-buffer:t


[the following should now work.]

#+R: action:hist columns:1 colour:hotpink
#+R: intable:continuous-data outfile:"png" title:"histogram example"


Dan



> 
> Thanks, Graham
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

-- 
http://www.stats.ox.ac.uk/~davison

  reply	other threads:[~2009-02-05 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04  4:59 org-R tutorial on Worg Dan Davison
2009-02-04  7:23 ` JimmyWu
2009-02-04 12:55 ` Carsten Dominik
2009-02-04 18:30 ` Graham Smith
2009-02-04 18:50   ` Nick Dokos
2009-02-04 19:01     ` Graham Smith
2009-02-04 18:54   ` Dan Davison
2009-02-04 18:56     ` Dan Davison
2009-02-05  8:04       ` Graham Smith
2009-02-05 14:58         ` Dan Davison [this message]
2009-02-05 15:10           ` Graham Smith
2009-02-04 19:10     ` 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=20090205145842.GB7611@stats.ox.ac.uk \
    --to=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=myotisone@gmail.com \
    /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).