From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: org-babel's treatment of NA in R source block Date: Mon, 01 Oct 2012 13:10:22 -1000 Message-ID: References: <20121001225459.GA19395@panahar> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIp88-0007sq-A1 for emacs-orgmode@gnu.org; Mon, 01 Oct 2012 19:10:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIp85-0004Su-4O for emacs-orgmode@gnu.org; Mon, 01 Oct 2012 19:10:27 -0400 Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:35647) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TIp84-0004PB-Pe for emacs-orgmode@gnu.org; Mon, 01 Oct 2012 19:10:25 -0400 Received: from [72.253.144.27] (port=62930 helo=poto.westell.com) by box472.bluehost.com with esmtpa (Exim 4.76) (envelope-from ) id 1TIp7t-0006Ch-7J for emacs-orgmode@gnu.org; Mon, 01 Oct 2012 17:10:13 -0600 In-Reply-To: <20121001225459.GA19395@panahar> (Vikas Rawal's message of "Tue, 2 Oct 2012 07:54:59 +0900") 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: emacs-orgmode Vikas Rawal writes: > If the result of an R source block contains a data frame with NA, the > NAs are replaced by "nil" when I evaluate the source block. When I > export the file, these appear as nil in the resulting pdf/latex file. > > I would like the NAs to be replaced by blank cells or by a less > obstrusive character like a ".". Is there a simple way I could change > this behaviour? > > Vikas > > Aloha Vikas, One route might be the ascii package in R, which exports objects to several markup languages, including Org. The ascii() argument na.print is a character string that specifies how NA should appear in the output. All the best, Tom -- Thomas S. Dye http://www.tsdye.com