mood <- factor(c("happy", "sad", "happy", "angry", "happy")) print(mood) table(mood)
Click Run to execute this code.