我有多个回归输出,并且我已经使用整洁的方法将其简化为一个小标题。
我想将输出从长转换为宽。
group | term | estimate | p.value |
A | x1 | 0.25 | 0.02165 |
A | x2 | 0.54 | 0.03062 |
A | x3 | 0.78 | 0.03155 |
B | x1 | 0.99 | 0.03154 |
B | x2 | 0.14 | 0.02074 |
B | x3 | 0.56 | 0.02111 |
I would like the final output to look like this
term | A.estimate | A.p.value | B.estimate | B.p.value |
x1 | 0.25 | 0.02165 | 0.99 | 0.03154 |
x2 | 0.54 | 0.03062 | 0.14 | 0.02074 |
x3 | 0.78 | 0.03155 | 0.56 | 0.02111 |