I am writing a beamer presentation and I'm trying to create two sets of presentations, one of which omits entirely some of the slides of the other. That is, for certain frames I would like to define a new environment that, by changing the \newenvironment command at the top, the frame will either be included or not. I figured I could achieve this by defining a new environment to be equivalent to the "comment" environment. This is what I've tried and it's giving me an error:
I don't know what's causing the error. It might be that the everything between the \begin{comment} and \end{comment} (that is, the "}{") is treated as a comment. I propose the following solution, using a the package environ, which seems pretty nice: