From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: [Org-Babel] and R... non-numeric cells Date: Wed, 18 Aug 2010 09:15:27 +0200 Message-ID: <874oes5r3k.fsf@mundaneum.com> References: <871va3hnvj.fsf@mundaneum.com> <874oezr2ze.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Dan, Dan Davison wrote: > S=C3=A9bastien Vauban > writes: >> >> #+TBLNAME: investissement-2010-2013 >> #+ATTR_LaTeX: align=3DlSSSS >> | | \s{Ann=C3=A9e 2010} | \s{Ann=C3=A9e 2011} | \= s{Ann=C3=A9e 2012} | \s{Ann=C3=A9e 2013} | >> |------------------------+----------------+----------------+------------= ----+----------------| >> | RFO | 2596376.30 | 1500000.00 | 500000= .00 | 500000.00 | >> | RFO r=C3=A9seau structurant | 3804467.00 | 6534066.00 | 38= 04467.00 | 0.00 | >> | =C3=89quipements | 1000000.00 | 150000.00 | = 50000.00 | 50000.00 | >> |------------------------+----------------+----------------+------------= ----+----------------| >> | Total (HTVA) | 7400843.30 | 8184066.00 | 4354467= .00 | 550000.00 | >> #+TBLFM: @5$2=3Dvsum(@-I..@-II);%.2f::@5$3=3Dvsum(@-I..@-II);%.2f::@5$4= =3Dvsum(@-I..@-II);%.2f::@5$5=3Dvsum(@-I..@-II);%.2f >> >> whose graphical representation is: >> >> #+srcname: barplot-investment(ptable =3D investissement-2010-2013) >> #+begin_src R :file 1-01-investissement-2010-2013.png :exports none :ses= sion >> source("mcplot.R", local=3DTRUE) >> ## select the last row only, exclude first column, scale: unit =3D 1M >> alldata <- as.matrix(ptable[2:4, -1]) / 1000000 >> axisLabels <- c("Ann=C3=A9e", "Montant HTVA (M=E2=82=AC)") >> mcStackedBarplot(alldata, "Investissements", c(2010:2013), ptable[-nrow(= ptable),1], legend.location=3D"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.1= 0: 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 --=20 S=C3=A9bastien 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