Skip to content

doRev() executes the entire content of the history file #9

@davidcerny

Description

@davidcerny

While experimenting with PRs #6 and #7, I was wondering why my simple test command – read in two tree traces, construct the MCC tree, and write it to a Nexus file – was being executed multiple times. The answer turned out to be simple but surprising: the function executes not just the input supplied by the user, but the entire content of the .Revhistory file. The only way to suppress this behavior is to call clearRev() before each doRev() call.

I guess this was the only obvious way to accomplish what the documentation describes as the desired goal:

This function allows users to make multiple calls to RevBayes, while maintaining a persistent input history. This means that variables defined in one call can be referenced in another call, giving the feel of a continuous RevBayes session.

However, there is a huge difference between successively executing commands A, B, and C, and executing A, A+B, and A+B+C. It would be nice to at least make this behavior optional by means of an extra argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions