我想在每组(t)的图中表达每列(a,b,c,d,e)的频率。
我不知道该怎么办。
如图所示,数据是以数据框架的形式选择的,但是我不知道在下图中表达该数据。
我尝试仅提取使用GGPLOT的值,但即使这也没有解决。有一个好方法吗?
有没有办法用钢筋图以外的线表达它?
帮我。

I want to express the frequency of each column (a,b,c,d,e) in a graph of (t) for each group.
I don't know what to do.
As shown in the figure, the data was selected in the form of a data frame, but I don't know what to do when I express it in the next graph.
I tried to extract only the value for a with ggplot, but even this didn't work out. Is there a good way?
Is there a way to express it with lines other than bar graphs?
Help me.

发布评论
评论(2)
您可以使用以下代码:
输出:
You can use the following code:
Output:
将数据旋转更长以合并列A到e的所有计数,仅在一个名称和值列内,可以用作GGPLOT的维度美学:
由
Pivot the data longer to merge all counts of columns a to e inside just one name and value column, which can be used as dimension aesthetics for ggplot:
Created on 2022-05-06 by the reprex package (v2.0.0)