[Top][All Lists]

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

Re: [Orgmode] [babel] R - variable names in summary

From: Dan Davison
Subject: Re: [Orgmode] [babel] R - variable names in summary
Date: Wed, 09 Dec 2009 14:14:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Graham Smith <address@hidden> 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
summary(cbind(babeltest, babeltest))

       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

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.


> 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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

reply via email to

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