In R, categorical data is stored using the factor class. While string variables can be treated as text, converting them to factors ensures they are correctly interpreted in statistical models.
: Cross-tabulating two or more variables can be done with table() or the crosstab() function from the descr package . Data Visualization Analysis of categorical data with R
: The table() function generates counts for each category. In R, categorical data is stored using the factor class