Common Error "all arguments must have the same length"

It’s almost impossible to give detailed help based only on an error message, because the root cause of the error may lie several steps before the place where something finally failed. So as always, a reproducible example would be helpful here! :grin:

That said, the specific error is coming from table(), base R’s core cross-tabulating function, so a good place to start is by taking a look at its documentation (linked above). However, again, it sounds like you did not write this call to table() — it seems to be coming from inside some other function you called. So without more information I can’t say for sure where things are going wrong.

1 Like