I have run into a new error, which seems to not have been solved yet (at least, I couldn't find a resolution). I am running some tests on a simple dataframe, and when I attempt to spread the data by the object, I get the following error:
Error in if (n > 2^31) { : missing value where TRUE/FALSE needed
I have no if else loops, nor NAs in the data. I read somewhere I might have something to do with my windows version, but I'm not sure.
We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.
If you've never heard of a reprex before, you might want to start by reading this FAQ:
I was able to figure it out by creating a new dataframe with the same information from my previous one. I believe it might have been an issue with the sequential use of leftjoin and subset, but I'm not quite sure.
However, the fix of creating a new dataframe using cbind and renaming the columns seems to work.