I have a df of this pattern:
structure(list(`DTEND;VALUE=DATE` = structure(c(19389, 19395,
19396, 19402, 19409, 19410), class = "Date"), `DTSTART;VALUE=DATE` = structure(c(19389,
19395, 19396, 19402, 19409, 19410), class = "Date"), SUMMARY = c("Activity",
"Activity", "Activity",
"Activity", "Activity",
"Activity"), UID = c("beb9cbab6d0a2534d17c",
"0f57d3b22bd2b6ed4950", "c3f192b290e8f001529c", "c15769cc203dfbe8caa6",
"d3554e447336aa78ddd8", "e78a4cfd97307bdb2ea5"), SEQUENCE = c("0",
"0", "0", "0", "0", "0"), DTSTAMP = c("20230116T175008Z", "20230116T175008Z",
"20230116T175008Z", "20230116T175008Z", "20230116T175008Z", "20230116T175008Z"
), DESCRIPTION = c("link to open",
"to open",
"link to open",
"link to open",
"link to open",
"link to open"
), LOCATION = c("M", "M", "M",
"M", "M", "M"
)), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame"
))
I'm attempting to use the library(calendar) to convert this dataframe to a usable ics format. While the following produces a ics file on my computer, it doesn't do anything while trying to export it to outlook (or open it directly):
ic_write(df, MY-DESKTOP-LOCATION)
Using the guidance found here: https://www.rdocumentation.org/packages/calendar/versions/0.0.1.
Downloading the example file (found at the top of the page), converting it to another df using the function: ic_read() and then using the ic_write() again does work for that example file. Why is my df (dput above) not functioning as expected? (Events posted are meant to be all-day events).
I managed to get it working, first by changing the name of the date columns to DTSTART and DTEND, then converting them to POSIXCT using as.POSIXct(). Then I converted the df using ical(), then writing the corresponding ical file using ic_write() fixed it.