Returns a data frame

ic_dataframe(x)

Arguments

x

Lines read-in in from an iCal file

Examples

ic_dataframe(ical_example)
#>               DTSTART               DTEND          DTSTAMP
#> 1 2018-08-09 16:00:00 2018-08-09 16:30:00 20180810T094100Z
#>                                     UID          CREATED DESCRIPTION
#> 1 1119ejg4vug5758527atjcrqj3@google.com 20180807T133712Z         \\n
#>      LAST-MODIFIED LOCATION SEQUENCE    STATUS                  SUMMARY TRANSP
#> 1 20180807T133712Z                 0 CONFIRMED ical programming mission OPAQUE
ic_dataframe(ical_outlook)
#>                                                         DESCRIPTION
#> 1                                           http://2018.erum.io/\\n
#> 2 Ha aaa\\a\\aYau waaa hava praaaaay haard ay aaw ahaa aha aaa aaka
#>                                                                       UID
#> 1 040000008200E00074C5B7101A82E0080000000006245657188FD301000000000000000
#> 2 040000008200E00074C5B7101A82E00800000000F0CCE6F58CC2D301000000000000000
#>    01000000096B0CD2B1133C746B52B5B0B1F12B731
#> 1  01000000096B0CD2B1133C746B52B5B0B1F12B731
#> 2                                       <NA>
#>                                                      SUMMARY DTSTART;VALUE=DATE
#> 1 In Budapest for European R Users Meeting (eRum) conference         2018-05-14
#> 2              Caacaaad: aaa aaka shara - Laads aauach avaaa               <NA>
#>   DTEND;VALUE=DATE  CLASS PRIORITY          DTSTAMP      TRANSP    STATUS
#> 1       2018-05-18 PUBLIC        5 20180814T134259Z TRANSPARENT CONFIRMED
#> 2             <NA> PUBLIC        5 20180814T134259Z TRANSPARENT CONFIRMED
#>   SEQUENCE                                           LOCATION
#> 1        0                                                   
#> 2        6 Leeds City Centre - time and venue to be confirmed
#>   X-MICROSOFT-CDO-APPT-SEQUENCE X-MICROSOFT-CDO-BUSYSTATUS
#> 1                             0                       FREE
#> 2                             6                       FREE
#>   X-MICROSOFT-CDO-INTENDEDSTATUS X-MICROSOFT-CDO-ALLDAYEVENT
#> 1                           BUSY                        TRUE
#> 2                           BUSY                       FALSE
#>   X-MICROSOFT-CDO-IMPORTANCE X-MICROSOFT-CDO-INSTTYPE
#> 1                          1                        0
#> 2                          1                        0
#>   X-MICROSOFT-DONOTFORWARDMEETING X-MICROSOFT-DISALLOW-COUNTER
#> 1                           FALSE                        FALSE
#> 2                           FALSE                        FALSE
#>    010000000FB969A27B8680C419BAD7A7656340914 DTSTART;TZID=GMT Standard Time
#> 1                                       <NA>                           <NA>
#> 2  010000000FB969A27B8680C419BAD7A7656340914                20180515T100000
#>   DTEND;TZID=GMT Standard Time
#> 1                         <NA>
#> 2              20180515T160000
ics_file <- system.file("extdata", "england-and-wales.ics", package = "calendar")
x = readLines(ics_file)
x_df = ic_dataframe(x)
head(x_df)
#>   DTEND;VALUE=DATE DTSTART;VALUE=DATE                 SUMMARY
#> 1       2012-01-03         2012-01-02          New Year’s Day
#> 2       2012-04-07         2012-04-06             Good Friday
#> 3       2012-04-10         2012-04-09           Easter Monday
#> 4       2012-05-08         2012-05-07  Early May bank holiday
#> 5       2012-06-05         2012-06-04     Spring bank holiday
#> 6       2012-06-06         2012-06-05 Queen’s Diamond Jubilee
#>                                         UID SEQUENCE          DTSTAMP
#> 1 ca6af7456b0088abad9a69f9f620f5ac-0@gov.uk        0 20180806T114130Z
#> 2 ca6af7456b0088abad9a69f9f620f5ac-1@gov.uk        0 20180806T114130Z
#> 3 ca6af7456b0088abad9a69f9f620f5ac-2@gov.uk        0 20180806T114130Z
#> 4 ca6af7456b0088abad9a69f9f620f5ac-3@gov.uk        0 20180806T114130Z
#> 5 ca6af7456b0088abad9a69f9f620f5ac-4@gov.uk        0 20180806T114130Z
#> 6 ca6af7456b0088abad9a69f9f620f5ac-5@gov.uk        0 20180806T114130Z
x = data.frame(x_df)
x_df2 = ic_dataframe(x)
identical(x, x_df2)
#> [1] TRUE