Can anyone help with this error message: droplevels

Well for droplevels to work, yes.

However it really depends on what your data is and what questions you are trying to ask. It may make more sense to filtre your data (i.e. subset it).

We probably need a REPREX (Create a reprex) with a statement of the issue and some sample data.

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here.

1 Like