Я пытаюсь решить ошибку ниже.Код и небольшой образец набора данных размещены ниже.
Ошибка в check_multispp (df, видов.var, replicate.var): одна или несколько копий состоит только из одного вида;пожалуйста, удалите эти копии до расчетов
library(codyn)
synchrony <- synchrony(df,
species.var = "species",
time.var = "time",
abundance.var = "abundance",
replicate.var = "replicate",
metric = "Loreau")
Error in check_single(df, species.var, time.var = time.var, replicate.var = replicate.var) :
Multiple records for one or more species found at:
time replicate
"2.2017" "111"
"2.2013" "135"
"2.2014" "135" etc.etc.
structure(list(replicate2 = c("2163", "2164", "2171", "2199", "2233",
"2234", "2235", "236", "2426", "2427", "2430"), UKX = c("8145700",
"8145700", "8143625", "1100925", "1100925", "1100925", "1100925",
"8143625", "3315425", "3315425", "3418450"), Date = c(1189987200,
1189987200, 1188950400, 1190246400, 1188259200, 1188259200, 1188345600,
906336000, 1220400000, 1220400000, 1220313600), time = c(3.2007,
3.2007, 3.2007, 3.2007, 2.2007, 2.2007, 2.2007, 3.1998, 3.2008,
3.2008, 3.2008), replicate = c("234", "331", "57", "336", "336",
"336", "342", "57", "356", "313", "157"), species = c("A", "A",
"A", "A", "A", "A", "A", "A", "A", "A", "A"), abundance = c(0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0), Time2 = c(25, 25, 25, 25, 8, 8, 8,
20, 26, 26, 26)), row.names = 100:110, class = "data.frame")