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

Improve SiteXSpec output when a "group" is not present #150

Open
johnpauls opened this issue Aug 16, 2024 · 1 comment
Open

Improve SiteXSpec output when a "group" is not present #150

johnpauls opened this issue Aug 16, 2024 · 1 comment

Comments

@johnpauls
Copy link
Member

If you run SiteXSpec() on an object /group combination for which there is no data, you get the following error:
Error in e2[[j]] : subscript out of bounds.

This should be altered to give a SiteXSpec matrix with all plots listed, no species, but a Total column with all zeroes, assuming Total=TRUE

@johnpauls
Copy link
Member Author

This can be done by adding a check after line 106 to see if XPlants has any rows, and if not creating the desired outcome. If the species argument is not NA then columns can be created for each requested species.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant