Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change behaviour of comment argument of setter functions #214

Closed
gustavdelius opened this issue Aug 21, 2021 · 1 comment
Closed

Change behaviour of comment argument of setter functions #214

gustavdelius opened this issue Aug 21, 2021 · 1 comment
Assignees
Milestone

Comments

@gustavdelius
Copy link
Member

For example for setSearchVolume() the documentation of the comment argument currently says:

A string describing how the value for 'search_vol' was obtained. This is ignored if 'search_vol' is not supplied or already has a comment attribute.

This is not very practical, because one may well want to change an existing comment. So the behaviour should be changed to:

Optional. A string describing how the value for 'search_vol' was obtained. This is ignored if 'search_vol' is not supplied.

@gustavdelius gustavdelius added this to the Version 2.3 milestone Aug 21, 2021
@gustavdelius gustavdelius self-assigned this Aug 21, 2021
@gustavdelius
Copy link
Member Author

gustavdelius commented Aug 21, 2021

Actually, I think we should just get rid of those comment arguments altogether and require people to put the comment directly on the value that they are setting. So instead of

params <- setSearchVolume(params, search_vol = my_search_vol, comment_search_vol = "my comment")

we'll have

comment(my_search_vol) <- "my comment"
params <- setSearchVolume(params, search_vol = my_search_vol)

We do however need to create a mechanism for going back to using the species_params. I propose that

params <- setSearchVolume(params, reset = TRUE)

should prompt a calculation of the search volume from the species parameters.

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

No branches or pull requests

1 participant