[R] Frequencies from a matrix - spider from frequencies
Uwe Dippel
udippel at uniten.edu.my
Mon Mar 15 08:24:47 CET 2010
First of all, I really like R! Still being a newbie, I find things (the
difficult ones) to be very simple.
Alas, some 'simple' things still escape me. (Maybe the tutorials are
often too much focused on the 'difficult' items??)
Here comes my 'problem', over which I have sweated for the last 2 hours:
My data are of a matrix 10x31, Likert Scale (1-5). 10 questions, 31
respondents. Now, I want to display the frequencies per question. I have
not found any better (any more simple) than
for (in in 1.10) print (table(learn[,i]))
And then, still, the scale is printed 10 times as well. I am sure, there
is a better function, but I didn't find one.
Actually, I would want the scale once, atop ('names'), and then the
10(questions) * 5 (length.of.scale) thereunder, like
1 2 3 4 5
1 3 4 2 1 2
2 5 9 2 1 4
3 4 4 6 1 3
....
And, now somewhat less of the ordinary, a spider/radar showing the
number of responses for each question (circular axis, 10), with the
frequencies as radial axes. That is, 5 polygons showing the frequencies
of the responses per each question.
Any help is appreciated, and my excuses for asking a simple question,
Uwe
More information about the R-help
mailing list