Skip to content

synchrony.R line 166 ['Gross'] creating error #127

@gsrednick

Description

@gsrednick

I am working with a large community time series (n = 91 species, 50 locations, 12 years). I have subsetted species into separate groups varying in the number of species for performing synchrony calculations. When running synchrony function with 'Loreau' metric there are no issues other than 'NA's produced for locations with species that do not vary over time. However, when I run the same function with the 'Gross' metric the function produces an error:

Error in names(subout) <- c(species.var, "sppcor") : 'names' attribute [2] must be the same length as the vector [1]

It appears that this error is produced at the inclusion of 15 species but not 16 species. I have isolated the error to line 166 in synchrony.R. My guess is that there are no correlations between some species due to high prevalence of zeros or unchanging values, but I am not sure.

Any thoughts on why this error is being produced?

A note: the dataset is fully balanced with no missing years and no NAs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions