Преобразовать неструктурированный CSV-файл во фрейм данных

Я изучаю R для текстового майнинга. У меня есть расписание телепрограмм в форме CSV. Программы обычно начинаются в 06:00 и продолжаются до 05:00 следующего дня, который называется днем ​​трансляции. Например: программы на 15/11/2015 начинаются в 06:00 и заканчиваются в 05:00 на следующий день.

Вот пример кода, показывающий, как выглядит расписание:

 read.table(textConnection("Sunday|\n 01-Nov-15|\n 6|Tom\n some information about the program|\n 23.3|Jerry\n some information about the program|\n 5|Avatar\n some information about the program|\nMonday|\n 02-Nov-15|\n 6|Tom\n some information about the program|\n 23.3|Jerry\n some information about the program|\n 5|Avatar\n some information about the program|"), header = F, sep = "|", stringsAsFactors = F)

чей вывод следующий:

  V1|V2
Sunday |  
01-Nov-15 |       
6 | Tom  
some information about the program |       
23.3 |  Jerry  
some information about the program |       
5 | Avatar  
some information about the program |       
5.3 | Panda  
some information about the program |       
Monday  |       
02-Nov-15|       
6  Jerry  
some information about the program |      
6.25 | Panda  
some information about the program |      
23.3 | Avatar  
some information about the program |       
7.25 |   Tom  
some information about the program |      

Я хочу преобразовать вышеуказанные данные в форму data.frame

Date            |Program|Synopsis
2015-11-1 06:00 |Tom    | some information about the program
2015-11-1 23:30 |Jerry  | some information about the program
2015-11-2 05:00 |Avatar | some information about the program
2015-11-2 05:30 |Panda  | some information about the program
2015-11-2 06:00 |Jerry  | some information about the program
2015-11-2 06:25 |Panda  | some information about the program
2015-11-2 23:30 |Avatar | some information about the program
2015-11-3 07:25 |Tom    | some information about the program

Я благодарен за любые предложения / советы относительно функций или пакетов, на которые я должен взглянуть.

Ответы на вопрос(3)

Ваш ответ на вопрос