I want to be able to pass all variables into the second argument of expand() without writing all of the variables out. I was hoping I could do something like a full stop or !! but I am not exactly finding the right way to pass it on.
Thanks! This does work as I wanted it to. I would still like to know how to pass the dataframe while getting it to "read" the variables instead if that is at all possible.
Could you clarify what you mean by "I would still like to know how to pass the dataframe while getting it to "read" the variables instead"? I am not sure what exactly this means.
Is there a way within expand() to only pass in the dataframe while getting it evaluated as all variables within the dataframe without writing each variable explicitly out?
I know that expand.grid() deals with this problem directly but I was wondering if there is some standard evaluation way of passing a dataframe while only evaluating the variables in that specific object.
No, currently you are not able to do this. In fact, I submitted an issue to the tidyr GitHub several months ago requesting this very feature. See here for more details.