From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: [babel] org mode tables and tangling Date: Thu, 12 Jan 2012 19:42:23 +0100 Message-ID: <871ur4yd80.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlPbq-0007lE-Ou for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 13:42:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlPbp-0007SO-MJ for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 13:42:46 -0500 Received: from lo.gmane.org ([80.91.229.12]:47292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlPbp-0007SG-CN for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 13:42:45 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RlPbk-0001AC-M1 for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 19:42:40 +0100 Received: from p57b63bb0.dip.t-dialin.net ([87.182.59.176]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 19:42:40 +0100 Received: from andreas.leha by p57b63bb0.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 19:42:40 +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: emacs-orgmode@gnu.org Hi all, What is the suggested way to use org mode tables in connection with tangling? Example: If I tangle this org mode file /=========================================\ | * org-tables and reproducibility | | #+name: params | | | number | param | | | |--------+-------| | | | 0 | 1 | | | | 1 | 1 | | | | | #+begin_src R :var params=params :tangle test.R | | apply(params, 1, print) | | #+end_src | \========================================/ the tangled file looks like /===================================================================\ | params <- read.table("/tmp/babel-19196cip/R-import-19196ILE", | | header=TRUE, row.names=NULL, sep="\t", as.is=TRUE) | | attach(params) | | apply(params, 1, print) | \==================================================================/ which depends on a temporary file. I could distribute that along with the tangled file, of course. But I'd like a distributable, ideally self-contained version, that my co-workers can work with. Something like this, maybe: /===========================================================\ | # generated with R dput()... | | babel_tmp_1238h098 <- structure(list(means = 0:1, sds = c(1L, 1L)), | | .Names = c("means", "sds"), | | class = "data.frame", | | row.names = c(NA, -2L)) | | params <- dget(textConnection("babel_tmp_1238h098", "r")) | \==========================================================/ Is such a mode of tangling already available for R? Best, Andreas