我的数据集如下
headings=rep(c("Name","Title","Email"),times=4)
info=c("J","M","j@gmail.com",
"K","L","k@gmail.com",
"F","G","f@gmail.com",
"N","Q","n@gmail.com")
df=data.frame(headings,info)
headings info
1 Name J
2 Title M
3 Email j@gmail.com
4 Name K
5 Title L
6 Email k@gmail.com
7 Name F
8 Title G
9 Email f@gmail.com
10 Name N
11 Title Q
12 Email n@gmail.com
我希望更改数据集的外观;
Name Title Email
1 J M j@gmail.com
2 K L k@gmail.com
3 F G f@gmail.com
4 N Q n@gmail.com
我不是很幸运以这种方式进行更改。它的数据集很大