Graham Smith <myotis...@gmail.com> 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 _______________________________________________ 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