From dusa.adrian at unibuc.ro  Mon Jun 16 09:49:46 2014
From: dusa.adrian at unibuc.ro (=?UTF-8?B?QWRyaWFuIER1yJlh?=)
Date: Mon, 16 Jun 2014 10:49:46 +0300
Subject: [Rd] index.search
In-Reply-To: <21406.40353.259201.480277@stat.math.ethz.ch>
References: <CAJ=0CtANJ8UALh8bwv+CceC75+sAmm-SEhNsFiqd=XUjpbs_tg@mail.gmail.com>
	<CADwqtCNrh5v1vgMtoJWW7Pd+m+xs4n0diXC8mZA=qeqbngLFiw@mail.gmail.com>
	<CAJ=0CtCuZZF2d7eWZzv96myB8cd88Pyks=uFdNiJdcxzbcnzhA@mail.gmail.com>
	<CADwqtCNUjqsDStxxuo5w7WpK+7wCuTcruwLV=PTFKKTbVmW2NA@mail.gmail.com>
	<CAJ=0CtBD32=SzJi7Zf_DR2THoOiZ3L32MHtzW3+a0V+VE-JvAg@mail.gmail.com>
	<21406.40353.259201.480277@stat.math.ethz.ch>
Message-ID: <CAJ=0CtBY2xAaRfPRKjh==QaYyvrbw07cwv6URM5VB41xgMGZYg@mail.gmail.com>

Oh my... this is so simple, why didn't I think of that...?
Thanks a lot Martin, beautiful,
Adrian


On Mon, Jun 16, 2014 at 10:32 AM, Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>>>>>> Adrian Du?a <dusa.adrian at unibuc.ro>
>>>>>>     on Mon, 16 Jun 2014 08:33:59 +0300 writes:
>
>     > On Mon, Jun 16, 2014 at 6:37 AM, Gabriel Becker
>     > <gmbecker at ucdavis.edu> wrote:
>     >> [...]  You can. This is valid R source, so the parser
>     >> will understand it
>     >>
>     >> expr = parse(text= example("deMorgan", package="QCA",
>     >> give.lines=TRUE))
>     >>
>     >> You can then evaluate some or all of that expression
>     >> using either R's own eval package or, e.g. Hadley
>     >> Wickham's evaluate package (for your particular usecase
>     >> evaluate will be easier I think).
>
>     > Oh, I see...! In that case I can use it, of course.  Did
>     > install the evaluate package, although one would expect
>     > some better documentation (no examples at all, especially
>     > at the main evaluate function).
>
>
>     >>> [...]
>     >> index.search is an unexported function, which means that
>     >> it is subject to change in how it behaves without notice
>     >> or even externally available reasons. You can get it via
>     >> :::, but again, it's really not the right tool here, and
>     >> not safe to use in general in code you expect to keep
>     >> working.
>
>     > Yes, I figured that much.  Of course it's not meant to be
>     > used in any decently working code, but I learn heavily by
>     > simply looking at these sort of (hidden) R functions.
>
>     > Thanks again, Adrian
>
> Apropos "not the right tool".  I'm a bit astonished that nobody
> mentioned the fact R already provides "the tool" to
> automatically compare all example outputs with a previous
> version (of the packages example outputs):
>
> *THE* manual (every package writer should know about,
>  re-read/browse about once a year, and search in for such questions):
>
> "Writing R Extensions", section Package subdirectories
> ----------------------------
> (e.g. on the CRAN master in Vienna,
>  http://cran.r-project.org/doc/manuals/R-exts.html#Package-subdirectories )
> says
>
> |    If directory 'tests' has a subdirectory 'Examples' containing a file
> |    'PKG-Ex.Rout.save', this is compared to the output file for running the
> |    examples when the latter are checked.
>
> So: After an 'R CMD check <PKG>' you only need to take and
> keep the  <PKG>-Ex.Rout  file that is produced (in the
> PKG.Rcheck/ directory), and save it into <PKG>/tests/<PKG>-Ex.Rout.save
> and from then on, every time you run R CMD check <PKG>  the
> comparison will be made.
>
> Martin Maechler, ETH Zurich



-- 
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
1, Schitu Magureanu Bd.
050025 Bucharest sector 5
Romania
Tel.:+40 21 3126618 \
        +40 21 3120210 / int.101
Fax: +40 21 3158391



[Rd] index.search
=?UTF-8?B?QWRyaWFuIER1yJlh?=