I'm new to understanding beta diversity and have been trying to follow this example given by R: https://cran.r-project.org/web/packages/hagis/vignettes/betadiversity.html
I want to replicate what was done similarly with beta dispersion in order to analyze variance between two groups: warm and cold years on species count data.
My meta data is set like this:

with species data being set as species matrix with the the individual species for each column and the years collected as the rows. The tutorial mentions needing to set data into a binary code to run betadisper correctly, which I want to do(hot=1, cold=0 for example) but do not understand really how to set this up, given their example. Is anyone familiar with "create_binary_matrix" function or setting the argument to accomplish this task? I'm still fairly novice to R.