From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: [babel] R - variable names in summary Date: Wed, 09 Dec 2009 14:14:28 -0500 Message-ID: <87vdggdkob.fsf@stats.ox.ac.uk> References: <2c75873c0912081550m5da3861fgb3a14f047f8638ae@mail.gmail.com> <87k4wwf6h1.fsf@stats.ox.ac.uk> <2c75873c0912090905y5d673fe3m879e7e79e77f3c89@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIRzi-0000Py-S4 for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 14:14:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIRzd-0000Na-Uu for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 14:14:38 -0500 Received: from [199.232.76.173] (port=54094 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIRzd-0000NX-Mk for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 14:14:33 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:35131) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIRzd-0001mJ-E2 for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 14:14:33 -0500 In-Reply-To: <2c75873c0912090905y5d673fe3m879e7e79e77f3c89@mail.gmail.com> (Graham Smith's message of "Wed, 9 Dec 2009 17:05:48 +0000") 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@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Graham Smith Cc: emacs-orgmode@gnu.org Graham Smith writes: > Dan, > >>> The colnames t works as expected, but how do I then see the variable >>> names when using the summary command, >> >> Just use :colnames t again for that. > > Thanks again, I almost had this solved but in > > #+begin_src R :session babeltest :colnames t > > I hadn't left a space between the end of babeltest and the : > > But I would never have figured out the :results output method, however. OK, it would be really helpful if you could let us know how we should improve the documentation of it. > > Next question is is to do with output with things like summary. In R > if you have lots of variables,the output wraps so it fits on the > screen. With babel it runs off the edge of the page. is there a quick > way of getting the output to fit an anticipated a4 pdf output. I'd suggest using :results output, and controlling the width of the output with options(width=whatever) in R. E.g. #+begin_src R :session babeltest :colnames t :results output options(width=80) summary(cbind(babeltest, babeltest)) #+end_src #+results: #+begin_example ID var1 var2 var3 ID Min. : 1.00 Min. :23.0 Min. :1.0 Min. :200.0 Min. : 1.00 1st Qu.: 3.25 1st Qu.:34.0 1st Qu.:4.0 1st Qu.:355.0 1st Qu.: 3.25 Median : 5.50 Median :45.5 Median :5.0 Median :425.0 Median : 5.50 Mean : 5.50 Mean :48.4 Mean :4.8 Mean :418.9 Mean : 5.50 3rd Qu.: 7.75 3rd Qu.:56.0 3rd Qu.:6.0 3rd Qu.:499.8 3rd Qu.: 7.75 Max. :10.00 Max. :89.0 Max. :7.0 Max. :600.0 Max. :10.00 var1 var2 var3 Min. :23.0 Min. :1.0 Min. :200.0 1st Qu.:34.0 1st Qu.:4.0 1st Qu.:355.0 Median :45.5 Median :5.0 Median :425.0 Mean :48.4 Mean :4.8 Mean :418.9 3rd Qu.:56.0 3rd Qu.:6.0 3rd Qu.:499.8 Max. :89.0 Max. :7.0 Max. :600.0 #+end_example I don't think either org or org-babel has any way to automatically wrap wide tables. Also bear in mind the tranpose function in R (t), although that's not helpful for this summary output, which is a rather weird table, not a standard matrix or data frame. Dan > > I appreciate this may be more an Emacs/orgmode question than a babel one. > > Graham > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode