WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Validate f function in epi[x]_slide; give better feedback if doesn't take enough args #168

@brookslogan

Description

@brookslogan

See this example:

epi_slide(jhu_csse_county_level_subset, function(x) print(x))
Error in .f(.x, ...) : unused argument (list())

The error message isn't that informative, and seems like it might be fairly commonly encountered. (I have trouble remembering the g arg despite discussing it for a while.)

We can check that f takes enough arguments beforehand. I believe I have something along these lines for a different function in #102. (See fn_max_n_args definition and use.)

Metadata

Metadata

Assignees

Labels

P1medium priorityREPLImproved print, errors, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions