我使用以下数据绘制了下图中的圆形图,但无法显示最窄部分的标签。任何线索为什么?我试过减小标签的大小,但不起作用。
数据
level1 level2 size
Interface A1 191730
Interface A2 524340
Interface minor 2529189
Interface P1 1273072
Interface P2 126295
Interface P3 279050
Interface P4 74326
Interface P5 16646
No structure A1 654914.333333333
No structure A2 4965368.33333333
No structure minor 13654304.3333333
No structure P1 6627555.33333333
No structure P2 1131774
No structure P3 2011299
No structure P4 485273
No structure P5 116248
Non-interface A1 317491
Non-interface A2 978807
Non-interface minor 3689632
Non-interface P1 1690987
Non-interface P2 192730
Non-interface P3 468848 …Run Code Online (Sandbox Code Playgroud) 我想在 data.frame 中生成一个列来计算组的连续 id(虚拟 df 中的 s 列)
dummy_df = data.frame(s = c("a", "a", "b","b", "b", "c","c", "a", "a", "c", "c","a","a"),
desired_output= c(1,1,1,1,1,1,1,2,2,2,2,3,3))
dummy_df$rleid_output = rleid(dummy_df$s)
dummy_df
Run Code Online (Sandbox Code Playgroud)
s desired_output rleid_output
1 a 1 1
2 a 1 1
3 b 1 2
4 b 1 2
5 b 1 2
6 c 1 3
7 c 1 3
8 a 2 4
9 a 2 4
10 c 2 5
11 c 2 5
12 a 3 6
13 a …Run Code Online (Sandbox Code Playgroud)