Out of the 13 in bioshifts v1, we fitted SDMs for 3 species (382 marine and 0 terrestrials). We cannot fit SDMs for all species in v1 due to limitation in the time-span of the available environmental data. This means, we selected marine species with shifts occurring after 1983 and terrestrial species with shifts occurring after 1981.
3What taxa?
Code
ggplot(MyList, aes(x=class))+ggtitle("N species by Class and Phylum")+geom_bar()+theme_classic()+coord_flip()+facet_wrap(.~phylum, scales ="free_y", ncol =3)
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Warning in FUN(X[[i]], ...): NAs introduced by coercion
Code
periods <-do.call(rbind,periods)tmp <-data.frame(table(periods$duration))ggplot(tmp, aes(x = Var1, y = Freq))+geom_col()+theme_classic()+geom_text(aes(label = Freq), vjust =-0.5)+xlab("Shift duration (years)")
8Shift periods
Code
tmp <- periods[,c("start","end")]tmp <-melt(tmp)
Warning in melt(tmp): The melt generic in data.table has been passed a
data.frame and will attempt to redirect to the relevant reshape2 method;
please note that reshape2 is deprecated, and this redirection is now
deprecated as well. To continue using melt methods from reshape2 while both
libraries are attached, e.g. melt.list, you can prepend the namespace like
reshape2::melt(tmp). In the next version, this warning will become an error.
No id variables; using all as measure variables
Code
ggplot(data = tmp, aes(x = value, fill = variable, color = variable))+geom_density(aes(y=2.5* ..count..), alpha = .3)+geom_histogram(bins =100, alpha = .7)+theme_classic()+xlab("Shift period (years)")+ylab("Freq")