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

create.SRs.data() throws an error in R 4.1. #56

Open
danaim opened this issue Jul 2, 2021 · 1 comment
Open

create.SRs.data() throws an error in R 4.1. #56

danaim opened this issue Jul 2, 2021 · 1 comment

Comments

@danaim
Copy link

danaim commented Jul 2, 2021

Hi,

In the new R version get() signals an error if the first argument has length greater than 1.

Error in get(grep(stks.data[[nmstk]], pattern = "_params.n", value = TRUE)) : first argument has length > 1
> grep(stks.data[[nmstk]], pattern = "_params.n", value = TRUE)
[1] "stk1_params.n" "stk1_params.name"

A possible solution would be to add a $ at the end of the pattern to grep:
> grep(stks.data[[nmstk]], pattern = "_params.n$", value = TRUE)
[1] "stk1_params.n"

The same error possible holds for other create.XX functions, I haven't checked yet
Thank you,

Danai

@aleorio
Copy link

aleorio commented Oct 27, 2021

Yes, I have discovered the same problem. It would be great if this could be fixed. It works with R 4.0 but not with newer versions.
Thanks
Ale

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

2 participants