I have a data set that is measuring emotions of respondents as they are shown different stimuli. Here is an example:
Sample Attribute Score Rank
A Delighted 180 High
A Happy 200 High
A Tired 130 Medium
B Delighted 160 Medium
B Happy 128 Low
B Tired 115 Low
I am fairly new to R, and I'm having issues actually making a bar chart that only shows sample A. This is what I tried doing:
ggplot(data =
filter(DATA, Category == "A"),
mapping = aes(x = Score, y = Attribute)) +
geom_
But R gives me this error:
Error: `data` must be a data frame, or other object coercible by `fortify()`, not an S3 object with class mts/ts.
Ideally, I am trying to get a bar chart that has the attributes listed on the vertical axis, the scores on the x-axis, and only shows sample A, with the bars color coded by Rank. Any help would be great!
