I'm new beginner to R, trying to cross-tabulate the variables, use the ctable() function from package "summarytools".
But I'm encountering some errors that look like the following.

I'm learning to use R by following the worksheet for categorical data analysis of R. The result should look like this.

I will be grateful if you can help me to figure out what's going wrong.
Per others, yes include data and code so the error is reproducible.
I just had this issue when I updated R and packages - not sure if it was a new version of summarytools or something else. Make sure the columns you will use in ctable are factor. Not sure if yours are character. I was having this problem because my columns were numeric.
Something like (using dplyr):
Good luck!