mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 05:07:30 +02:00
moved to stRoke package
This commit is contained in:
parent
8199ec6663
commit
73573f15f1
2 changed files with 0 additions and 104 deletions
|
|
@ -1,46 +0,0 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/ds2ical.R
|
||||
\name{ds2ical}
|
||||
\alias{ds2ical}
|
||||
\title{Convert data set to ical file}
|
||||
\usage{
|
||||
ds2ical(
|
||||
data,
|
||||
start = start,
|
||||
end = end,
|
||||
location = location,
|
||||
summary.glue.string = "ID {id} [{assessor}]",
|
||||
description.glue.string = NULL
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data set}
|
||||
|
||||
\item{start}{dplyr style event start datetime column name}
|
||||
|
||||
\item{end}{dplyr style event end datetime column name}
|
||||
|
||||
\item{location}{dplyr style event location column name}
|
||||
|
||||
\item{summary.glue.string}{character string to pass to glue::glue() for event
|
||||
name (summary). Can take any column from data set.}
|
||||
|
||||
\item{description.glue.string}{character string to pass to glue::glue() for
|
||||
event description. Can take any column from data set.}
|
||||
}
|
||||
\value{
|
||||
tibble of class "ical"
|
||||
}
|
||||
\description{
|
||||
Convert data set to ical file
|
||||
}
|
||||
\examples{
|
||||
df <- dplyr::tibble(start = c(Sys.time(), Sys.time() + lubridate::days(2)),
|
||||
id = c("1", 3), assessor = "A", location = "111", note = c(NA, "OBS")) |>
|
||||
dplyr::mutate(end= start+lubridate::hours(2))
|
||||
df |> ds2ical()
|
||||
df |> ds2ical(summary.glue.string = "ID {id} [{assessor}] {note}")
|
||||
# Export .ics file: (not run)
|
||||
ical <- df |> ds2ical(start, end, location, description.glue.string = "{note}")
|
||||
# ical |> calendar::ic_write(file=here::here("calendar.ics"))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue