Hi The variable transfer of tables from org to R caused sometimes 'could not find function "read.table"' errors (e.g. when the file was tangled into a ./data directory which was loaded by the function devtools::load_all("./")). This can easily be fixed by adding the package name to the call in R, i.e. replacing =read.table()= with =utils::read.table()= which is done in this patch.
In R the calls read.table and utils::read.table are interchangeable (the second one is actually preferred) so no negative effects can be expected. Cheers, Rainer
From 7e43b724d9fd2557aef7440bb75de0e026a29c88 Mon Sep 17 00:00:00 2001 From: "Rainer M. Krug" <r.m.k...@gmail.com> Date: Mon, 6 Oct 2014 13:48:49 +0200 Subject: [PATCH] ob-R.el: Add package name to read.table call * lisp/ob-R.el: (ob-R-transfer-variable-table-with-header): Add package name to call of R function read.table (now utils::read.table). This clarifies the call as well as avoids 'could not find function' error in R under certain conditions. --- lisp/ob-R.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ob-R.el b/lisp/ob-R.el index ea33031..dd0b0b9 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -101,7 +101,7 @@ this variable.") con <- textConnection( %S ) - res <- read.table( + res <- utils::read.table( con, header = %s, row.names = %s, @@ -119,7 +119,7 @@ This function is used when the table contains a header.") con <- textConnection( %S ) - res <- read.table( + res <- utils::read.table( con, header = %s, row.names = %s, -- 2.1.2
-- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982
pgpRe_6szagaQ.pgp
Description: PGP signature