how to compare diversity within and between groups? (comparison alpha x beta diversity)

Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.

Many of the regulars here can help explain problems like these by reading the documentation and working the examples. (Only because we're experienced in how R documentation works in terms of arguments and values.) But in narrow domains, it's hit-or-miss finding someone familiar with the domain and the packages. It's really hard for the rest of us to dive into this type of question if we have to reverse engineer the problem.