Skip to content

extend to do.call case with func param as text (resolves #302)#309

Merged
bburns632 merged 2 commits intomainfrom
docall
Apr 11, 2024
Merged

extend to do.call case with func param as text (resolves #302)#309
bburns632 merged 2 commits intomainfrom
docall

Conversation

@bburns632
Copy link
Collaborator

do.call with the function argument as string will now properly appear on the function reporter. Previously, this would show as a do.call node with a circular reference. (#302)

This bit of code checks the recursion step for a list with a do.call call as the first element and a string as the second. If true, it converts the string to a call, and then continues with the recursion.

Note: baseballstats test package is changed, BUT because this do.call is in place, network remains identical. Therefore, unit test for this edge case included.

@bburns632 bburns632 requested a review from jayqi April 10, 2024 20:03
Copy link
Collaborator

@jayqi jayqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested it in the console as well, and it looks to work as expected.

@jayqi jayqi linked an issue Apr 11, 2024 that may be closed by this pull request
@bburns632 bburns632 merged commit e2ba8f5 into main Apr 11, 2024
@bburns632 bburns632 deleted the docall branch April 11, 2024 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle functions referenced by name as a string when using do.call()

2 participants