emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [babel] R questions
Date: Fri, 04 Dec 2009 23:31:29 +0100	[thread overview]
Message-ID: <87tyw674n2.fsf@mundaneum.com> (raw)

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



_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2009-12-04 22:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 22:31 Sébastien Vauban [this message]
2009-12-05  0:45 ` [babel] R questions Dan Davison
2009-12-08  9:50   ` Sébastien Vauban
2009-12-08 16:00     ` Thomas S. Dye
2009-12-08 21:37       ` Sébastien Vauban
2009-12-08  9:58   ` Sébastien Vauban
2009-12-08 16:26     ` Dan Davison
  -- strict thread matches above, loose matches on Subject: below --
2009-12-08 22:40 Thomas S. Dye
2009-12-09  9:04 ` Sébastien Vauban

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=87tyw674n2.fsf@mundaneum.com \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).