emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [babel] R questions


From: Sébastien Vauban
Subject: [Orgmode] [babel] R questions
Date: Fri, 04 Dec 2009 23:31:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hello,

One of this questions is a bit border-line, but I'm still trying ;-)

I have this table generated by a script:

--8<---------------cut here---------------start------------->8---
#+results: abc2008
| "2008/1"  | -78.59 |   1627.24 |
| "2008/2"  | -80.17 |    700.33 |
| "2008/3"  | -80.17 |     879.8 |
| "2008/4"  | -80.17 | -25823.17 |
| "2008/5"  | -80.17 |   3570.75 |
| "2008/6"  | -81.77 |    2377.8 |
| "2008/7"  | -81.77 |    2889.4 |
| "2008/8"  | -81.77 |   2612.92 |
| "2008/9"  | -81.77 |   1585.21 |
| "2008/10" |  -83.4 |   1561.42 |
| "2008/11" |  -83.4 |   2189.17 |
| "2008/12" |     "" |        "" |
--8<---------------cut here---------------end--------------->8---

I want to draw the 12 months with the values side by side.

Problem #1: the "" in the last line hinder the generation of the graph. Format
error.

--8<---------------cut here---------------start------------->8---
#+srcname: expenses-bar-plot(abc = abc2008)
#+begin_src R :results file :file abc2008.pdf
    barplot(abc[,3], col = "red", main = "Profit and Loss 2008", las = 1, xlab
    = "Months", ylab = "EUR")
#+end_src
--8<---------------cut here---------------end--------------->8---

Problem #2: I don't know how to ask for drawing the 2 columns. I've tried
putting the arguments in a list, I've tried `cbind' (as read in one of the Org
papers), nothing made it. This is the border-line question.

The first one (at least) merits an answer, as it's a generic problem on
handling empty results. Is there some spec to consider empty result equivalent
to empty strings or to 0. How can we set it to be 0, here, instead of ""?  I
guess it's that the problem for R.

Best regards,
  Seb

-- 
Sébastien Vauban





reply via email to

[Prev in Thread] Current Thread [Next in Thread]