Hello all,
Totally new to this and I'm just doing a frequency distribution analysis
on T-shirt sales by size. I have a .csv with 60 orders. I read in the
data using read.csv. If I look at the summary() or table() of the data it
looks fine, except that the shirt sizes are alphabetical rather than from
S-XXL--so the bar graph loses the shape of the data based on size.
All I want to do is get the table to arrange the data:
S M L XL XXL
Here's the code that I've run that got me closer to what I want. It seems
like it should be simple, but going through the "R in a Nutshell" and
asking Google as many different ways as I can think to phrase it are
turning up nothing.
Shirt.Size
L :20
M :20
S :11
XL : 7
XXL: 2
What I want is:
Shirt.Size
S :11
M :20
L :20
XL : 7
XXL: 2
Does anyone know how to do this, or am I coming at it from the wrong
direction?
If this has been answered previously and I've just failed to find it in my
searches, please accept my apologies.
Many Thanks,
Chris