Error in width - get_extent(prefix) : non-numeric argument to binary operator

Thank you. I am clearly wrong here. I did not read those error messages correctly.

What I think we need is a sample of the data you are working with. The small example you supplied above is not enough as it is not including all the variables.

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

I am not familiar with a cosinar analysis. Could you supply the rest of your code with a list of the packages you have loaded?

See FAQ Asking Questions for some suggestions on what we might need here