On Mon, Jun 16, 2014 at 6:37 AM, Gabriel Becker 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 packag
On Mon, Jun 16, 2014 at 6:36 AM, Brian Lee Yung Rowe wrote:
> Adrian,
>
> You might consider using a unit testing framework such as RUnit or testthat,
> which does this but in a more structured manner. Essentially you codify the
> behavior in a set of tests as opposed to comparing with a previous
On Sun, Jun 15, 2014 at 8:23 PM, Adrian DuÈa wrote:
> Hi Gabriel,
>
>
> I tried using the example() function, like this:
> example("deMorgan", package="QCA", give.lines=TRUE)
>
> That returns the commands from the examples section, but if a command
>
is split over multiple rows I cannot use it
Adrian,
You might consider using a unit testing framework such as RUnit or testthat,
which does this but in a more structured manner. Essentially you codify the
behavior in a set of tests as opposed to comparing with a previous version.
HTH,
Brian
â¢â¢â¢â¢â¢
Brian Lee Yung Rowe
Founder, Z
Hi Gabriel,
Actually, I am not going to use multiple versions of the same package,
but always the last version. What I would like to do is:
- to run all examples from all functions in the package, saving the
results into a list
- compare the list to an already saved one (from the previous version
Adrian,
R isn't really designed to use multiple versions of the same package in the
same R session. To do what you want you'll need to unload one version of
the package before you load the next, which will work some percentage of
the time between 50 and 100 ("usually"), but when it can be done it
Dear r-devel,
I am trying to automatically check if two successive versions of a
package have the same results (i.e. code not broken), by parsing the
example sections for each function against a previously tested
version.
While trying to replicate the code from example(), I am facing an
error rel