嗨我在文件夹中有多个csv文件,每个文件由以下格式的数据组成,需要在单个df中附加所有文件
Name: John Los Angeles CA
col1 col2 col3 col4
12/1/14 1:00 AM 13 12/5/14 1:00 AM 19 12/7/14 1:00 AM 32 12/11/14 1:00 AM 13
12/2/14 1:00 AM 91 12/6/14 1:00 AM 20.9 12/8/14 1:00 AM 111.9
12/7/14 1:00 AM 22.8 12/9/14 1:00 AM 22.8
12/8/14 1:00 AM 24.7 12/10/14 1:00 AM 24.7
12/11/14 1:00 AM 0
我试图将每两列一个接一个地追加到另一个下面,如下图所示
我尝试使用raw = read.csv("file1.csv",header = T,skip = 1)
而无法进一步
Date value variable Name city State file_name
12/1/14 1:00 AM 13 col1 John Los Angeles CA file
12/2/14 1:00 AM 91 col1 John Los Angeles CA file
12/5/14 1:00 AM 19 col2 John Los Angeles CA file
12/6/14 1:00 AM 20.9 col2 John Los Angeles CA file
12/7/14 1:00 AM 22.8 col2 John Los Angeles CA file
12/8/14 1:00 AM 24.7 col2 John Los Angeles CA file
12/7/14 1:00 AM 32 col3 John Los Angeles CA file
12/8/14 1:00 AM 111.9 col3 John Los Angeles CA file
12/9/14 1:00 AM 22.8 col3 John Los Angeles CA file
12/10/14 1:00 AM 24.7 col3 John Los Angeles CA file
12/11/14 1:00 AM 0 col3 John Los Angeles CA file
12/11/14 1:00 AM 13 col4 John Los Angeles CA file
....
....
12/11/14 1:00 AM 33 col1 hayes SD CA file_1
提前致谢