我是R的新手,我目前正在玩它,我遇到了一个问题,即绘制了我从CSV导入的以下数据框。
studentname dateofbirth GSF3A3U FJÖ1UF05AU EÐLI2GR05BT FOR3D3U FOR3L3DU FOR4A3U ROB2B3U STÆR3FV05ET USA1012 WIN3B3DU userid
1 Ada Gauidóttir 13.8.1997 8.3 8.0 4.0 6.8 8.5 8.1 4.0 5.9 9.0 9.4 1
2 Gjaflaug Amildóttir 14.6.1998 6.0 6.6 6.2 8.9 4.7 9.4 8.5 8.1 4.3 5.3 2
3 Unndís Jónasdóttir 2.11.1998 8.7 7.8 6.9 10.0 7.0 10.0 9.3 5.4 7.2 5.8 3
4 Sigjón Elfráðurson 14.10.1996 9.3 8.9 6.2 8.1 9.7 5.5 6.8 9.0 6.9 4.2 4
5 Þórbjörg Rökkvidóttir 12.10.2000 4.9 6.9 5.2 6.9 5.3 5.5 5.6 4.8 8.9 9.2 5
6 Richard Hlérson 3.2.2000 9.4 7.7 8.4 6.1 6.4 9.6 4.9 7.2 9.3 7.0 6
7 Tala Arnalddóttir 18.8.1997 7.9 7.1 6.9 6.0 9.3 5.4 8.1 6.8 5.8 6.7 7
8 Petrína Estefandóttir 24.9.1994 9.6 4.9 5.0 8.4 7.9 8.7 5.5 10.0 4.0 9.5 8
9 Tanja Finnlaugurdóttir 11.7.1993 6.7 6.5 6.9 8.3 6.3 9.6 9.1 4.2 9.6 4.7 9
10 Elly Amosdóttir 6.7.2001 4.8 7.0 4.3 9.5 7.1 4.2 6.6 5.3 9.0 4.4 10
我试图绘制这些数据,以便课程名称在X轴上,每个课程的行数(成绩)显示在Y轴上。
如果我使用以下代码:
students[,3:12, drop=FALSE]
以下结果正是我所寻找的,但我该如何分散这个?
GSF3A3U FJÖ1UF05AU EÐLI2GR05BT FOR3D3U FOR3L3DU FOR4A3U ROB2B3U STÆR3FV05ET USA1012 WIN3B3DU
1 8.3 8.0 4.0 6.8 8.5 8.1 4.0 5.9 9.0 9.4
2 6.0 6.6 6.2 8.9 4.7 9.4 8.5 8.1 4.3 5.3
3 8.7 7.8 6.9 10.0 7.0 10.0 9.3 5.4 7.2 5.8
4 9.3 8.9 6.2 8.1 9.7 5.5 6.8 9.0 6.9 4.2
5 4.9 6.9 5.2 6.9 5.3 5.5 5.6 4.8 8.9 9.2
6 9.4 7.7 8.4 6.1 6.4 9.6 4.9 7.2 9.3 7.0
7 7.9 7.1 6.9 6.0 9.3 5.4 8.1 6.8 5.8 6.7
8 9.6 4.9 5.0 8.4 7.9 8.7 5.5 10.0 4.0 9.5
9 6.7 6.5 6.9 8.3 6.3 9.6 9.1 4.2 9.6 4.7
10 4.8 7.0 4.3 9.5 7.1 4.2 6.6 5.3 9.0 4.4