Skip to content

Documentation examples seem wrong #2

@barryrowlingson

Description

@barryrowlingson

The readme.md documentation section "PROCESSING" has:

name <- opt_get( "--name" )
date <- opt_get( "--date", default=Sys.Date )

which doesn't seem to work because the -- signs are in the quoted string. I get NA values when I specify an option:

$ R --args --name=foo --date=now
> library(optigrab)
optigrab-0.9.2.1 (2019-01-05) - Copyright © 2019 Decision Patterns
> opt_get("name")
[1] "foo"
> opt_get("--name")
[1] NA

I think the documentation should be:

name <- opt_get( "name" )
date <- opt_get( "date", default=Sys.Date )

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