From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: R contingency table axes labels in org Date: Mon, 04 Nov 2013 06:52:52 -1000 Message-ID: References: <871u2wm9sw.fsf@syk.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNOg-0000No-7d for emacs-orgmode@gnu.org; Mon, 04 Nov 2013 11:53:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdNOa-0007Tz-3u for emacs-orgmode@gnu.org; Mon, 04 Nov 2013 11:53:02 -0500 Received: from oproxy18-pub.mail.unifiedlayer.com ([69.89.17.20]:46498) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VdNOZ-0007TN-Rk for emacs-orgmode@gnu.org; Mon, 04 Nov 2013 11:52:56 -0500 In-Reply-To: <871u2wm9sw.fsf@syk.fi> (Jarmo Hurri's message of "Mon, 04 Nov 2013 18:05:51 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jarmo Hurri Cc: emacs-orgmode@gnu.org Jarmo Hurri writes: > Greetings again. > > I need to represent a contingency table generated by R in an org file. R > output shows the labes of the vertical and the horizontal axes, but > these are pruned from the output in org-mode. Is there a nice way to > reintroduce the axes labels? > > # ---------------------------------------------------------------------- > * interesting data > #+BEGIN_SRC R :exports results :rownames yes :colnames yes > org.files <- c (1, 0, 2, 2, 2, 2, 1) > happiness <- c (1, 0, 2, 2, 2, 1, 2) > data <- data.frame (org.files, happiness) > table (data) > #+END_SRC > > #+RESULTS: > | | 0 | 1 | 2 | > |---+---+---+---| > | 0 | 1 | 0 | 0 | > | 1 | 0 | 1 | 1 | > | 2 | 0 | 1 | 3 | > # ---------------------------------------------------------------------- > > All the best, > > Jarmo > > > library(ascii) ... print(ascii(table(data)), type="org") hth, Tom -- Thomas S. Dye http://www.tsdye.com