ic_list: Convert raw ical text into a list of items

View source: R/ic_list.R

ic_listR Documentation

Convert raw ical text into a list of items

Description

This function breaks-up the iCalendar object into a list. By default it breaks it into events, where the number of events is the number of BEGIN:VEVENT event initiation lines (assumes all events start and end with ⁠:VEVENT⁠), as per the specification (see ic_spec()).

Usage

ic_list(x, pattern = ":VEVENT", include_pattern = FALSE)

Arguments

x

Lines read-in in from an iCal file

pattern

A text string to search from (an ical field)

include_pattern

should the pattern be included in the output? FALSE by default.

Examples

ic_list(ical_example)
ics_file <- system.file("extdata", "england-and-wales.ics", package = "ical")
x = readLines(ics_file)
ics_list = ic_list(x)
ics_list[1:2]
ic_list(x, include_pattern = TRUE)

calendar documentation built on May 29, 2024, 2:34 a.m.