From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [Org-Babel] and R... non-numeric cells
Date: Wed, 18 Aug 2010 09:15:27 +0200 [thread overview]
Message-ID: <874oes5r3k.fsf@mundaneum.com> (raw)
In-Reply-To: 874oezr2ze.fsf@stats.ox.ac.uk
Hi Dan,
Dan Davison wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw-XMD5yJDbdMSQIYZ4X/+iSw@public.gmane.orgrg>
> writes:
>>
>> #+TBLNAME: investissement-2010-2013
>> #+ATTR_LaTeX: align=lSSSS
>> | | \s{Année 2010} | \s{Année 2011} | \s{Année 2012} | \s{Année 2013} |
>> |------------------------+----------------+----------------+----------------+----------------|
>> | RFO | 2596376.30 | 1500000.00 | 500000.00 | 500000.00 |
>> | RFO réseau structurant | 3804467.00 | 6534066.00 | 3804467.00 | 0.00 |
>> | Équipements | 1000000.00 | 150000.00 | 50000.00 | 50000.00 |
>> |------------------------+----------------+----------------+----------------+----------------|
>> | Total (HTVA) | 7400843.30 | 8184066.00 | 4354467.00 | 550000.00 |
>> #+TBLFM: @5$2=vsum(@-I..@-II);%.2f::@5$3=vsum(@-I..@-II);%.2f::@5$4=vsum(@-I..@-II);%.2f::@5$5=vsum(@-I..@-II);%.2f
>>
>> whose graphical representation is:
>>
>> #+srcname: barplot-investment(ptable = investissement-2010-2013)
>> #+begin_src R :file 1-01-investissement-2010-2013.png :exports none :session
>> source("mcplot.R", local=TRUE)
>> ## select the last row only, exclude first column, scale: unit = 1M
>> alldata <- as.matrix(ptable[2:4, -1]) / 1000000
>> axisLabels <- c("Année", "Montant HTVA (M€)")
>> mcStackedBarplot(alldata, "Investissements", c(2010:2013), ptable[-nrow(ptable),1], legend.location="topright")
>> #+end_src
>>
>> That works perfectly for him (on Ubuntu 9.04, R 2.7.1, Emacs 22.2.1, Org 6.35)
>>
>> Not for me... on Ubuntu 10.04, R 2.10.1, Emacs 23.1.1, Org 7.01, ESS 5.10: I
>> get the message
>>
>> *Error in as.matrix(ptable[2:4, -1])/1e+06 :
>> non-numeric argument to binary operator*
Thanks a lot for your detailed explanation. It helped a lot.
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
prev parent reply other threads:[~2010-08-18 7:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 15:06 [Org-Babel] and R... non-numeric cells Sébastien Vauban
2010-08-12 15:20 ` Erik Iverson
2010-08-12 15:30 ` Neil Hepburn
2010-08-12 15:57 ` Erik Iverson
2010-08-12 20:27 ` Dan Davison
2010-08-18 7:15 ` Sébastien Vauban [this message]
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=874oes5r3k.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).