Skip to content

Potential future candidates for refactoring arguments #280

Closed
@bokov

Description

@bokov

Please specify whether your issue is about:

  • a possible bug
  • a question about package functionality
  • a suggested code or documentation change, improvement to the code, or feature request

If you are reporting (1) a bug or (2) a question about code, please supply:

  • a fully reproducible example using a publicly available dataset (or provide your data)
  • if an error is occurring, include the output of traceback() run immediately after the error occurs
  • the output of sessionInfo()

These are not bugs I encountered, but in reviewing import_methods.R it's clear that sooner or later somebody who uses certain formats will.

Rather than put in repetitive example code, I will just list below the reader functions that rio calls with an ... argument but which do not have a ... in their calling signatures. To replicate the bug, run import using any of these and include some argument that they do not accept (e.g. skip = 42).

.import.rio_* will allow you to use such an argument (as it should) and it will pass that argument to the target function via ... but the target function will error instead of ignoring it because it does not have an ... argument.

base::dget
foreign::read.epiinfo
foreign::read.systat
foreign::read.mtp
fst::read.fst
haven::read_sas
haven::read_xpt
hexView::readEViews
pzfx::read_pzfx
readODS::read_ods
utils::read.DIF


## session info for your system
Not applicable

This can be fixed either by removing ... from the function call or by wrapping the above functions in arg_reconcile(). I will be happy to submit a PR for this if there is interest.

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