From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: [BUG] [babel] [R] :colnames yes conflicts with :results file Date: Tue, 06 Jan 2015 06:01:02 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8WZX-0004A6-75 for emacs-orgmode@gnu.org; Tue, 06 Jan 2015 11:01:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8WZN-0000in-9E for emacs-orgmode@gnu.org; Tue, 06 Jan 2015 11:01:31 -0500 Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:33565) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Y8WZN-0000iM-2r for emacs-orgmode@gnu.org; Tue, 06 Jan 2015 11:01:21 -0500 In-Reply-To: (Rainer M. Krug's message of "Tue, 06 Jan 2015 14:49:48 +0100") 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: Rainer M Krug Cc: Andreas Leha , emacs-orgmode@gnu.org Aloha Rainer, Rainer M Krug writes: > I don't think this is a bug as it is not clear what should happen. > In the org manual it states concerning the :results file > > ,---- > | * `file' The results will be interpreted as the path to a file, and > | will be inserted into the Org mode buffer as a file link. E.g., > | `:results value file'. > `---- > > But the :colnames only works on tables (i.e. :results table) - but the > result is represented as a link to a file. So what should happen? I think this is mistaken. "Tables" occur in at least three contexts in babel source code blocks. There are input tables, :var mytable, there are "tables" within the code block, represented in R as a dataframe or a matrix, and there are output tables, which are placed in the Org mode buffer as a result. I use :colnames to keep the column names of input tables associated with the "tables" within the code block, and typically have them represented in the output, whether that is a "table" written to file, or output to the Org mode buffer as an Org mode table, either by default or (more rarely) through use of :results table. In my experience :results table is mostly useful for coercing a value that babel would otherwise interpret as a scalar into a single element table. > If you would like to have a table with links to files, the easiest is to > put the file names into [[]] in R and then return them in a table - or > use :results output and "draw" the table. > > But as it stands, these two header arguments do not go together. Which two header arguments? :results table file is contradictory, but :colnames yes :results file is not, or should not be, IMHO. All the best, Tom -- Thomas S. Dye http://www.tsdye.com