From: Rainer M Krug <Rainer@krugs.de>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] read.table in variable transfer caused sometimes "function not found" error - small change
Date: Wed, 08 Oct 2014 20:39:41 +0200 [thread overview]
Message-ID: <m2ppe2v21e.fsf@krugs.de> (raw)
In-Reply-To: <alpine.OSX.2.00.1410080825550.358@charles-berrys-macbook.local> (Charles C. Berry's message of "Wed, 8 Oct 2014 08:43:47 -0700")
[-- Attachment #1: Type: text/plain, Size: 1753 bytes --]
"Charles C. Berry" <ccberry@ucsd.edu> writes:
> On Wed, 8 Oct 2014, Rainer M Krug wrote:
>
>> "Charles C. Berry" <ccberry@ucsd.edu> writes:
>>
>>> On Mon, 6 Oct 2014, Rainer M Krug wrote:
>>>
>>>> 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.
>>>
>>> It does fix that one case.
>>>
>>> But I wonder if that is the best way.
>>>
>>> The heart of the matter is that load_all eventually calls sys.source,
>>> which can be persnickety about finding objects on the search path. See
>>> ?sys.source.
>>>
>>> If the src block you tangle to ./data/ has any code that uses any
>>> other objects from utils, stats, datasets or whatever, you will be in
>>> the same pickle.
>>
>> Exactly - that is true. But it is the same when putting this in a
>> package (as far as I am aware).
>>
>
> Do you mean that putting `x <- rnorm(10)' into a data/*.R file will
> fail when you try to build and check?
>
> In fact, `R CMD build' will execute it and save the result as a
> data/*.rda file. And check will go through.
>
> devtools::load_all (calling load_data) fails to do that. Which is why
> I think this is a devtools issue.
OK - point taken. But I still think that the =utils::read.table()= would
not hurt, rather make the variable transfer safer.
Rainer
>
> Chuck
>
>
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
next prev parent reply other threads:[~2014-10-08 18:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 12:00 [PATCH] read.table in variable transfer caused sometimes "function not found" error - small change Rainer M Krug
2014-10-07 20:51 ` Charles C. Berry
2014-10-08 9:54 ` Rainer M Krug
2014-10-08 15:43 ` Charles C. Berry
2014-10-08 18:39 ` Rainer M Krug [this message]
2014-10-08 21:34 ` Charles C. Berry
2014-10-09 8:19 ` [NEW PATCH] " Rainer M Krug
2014-10-09 8:25 ` Rainer M Krug
2014-10-10 4:21 ` Aaron Ecay
2014-10-10 7:43 ` Rainer M Krug
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ppe2v21e.fsf@krugs.de \
--to=rainer@krugs.de \
--cc=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.