episode_group {diyar}R Documentation

Link events to chronological episodes.

Description

Link dated events (records) which have similar attributes and occur within specified durations of each other. Each set of linked records are assigned a unique identifier with relevant group-level information.

Usage

episode_group(df, ..., episode_type = "fixed")

fixed_episodes(
  date,
  case_length = Inf,
  episode_unit = "days",
  to_s4 = TRUE,
  case_overlap_methods = 8,
  deduplicate = FALSE,
  display = "none",
  bi_direction = FALSE,
  recurrence_length = case_length,
  recurrence_overlap_methods = case_overlap_methods,
  include_index_period = TRUE,
  ...,
  overlap_methods = 8,
  overlap_method = 8,
  x
)

rolling_episodes(
  date,
  case_length = Inf,
  recurrence_length = case_length,
  episode_unit = "days",
  to_s4 = TRUE,
  case_overlap_methods = 8,
  recurrence_overlap_methods = case_overlap_methods,
  deduplicate = FALSE,
  display = "none",
  bi_direction = FALSE,
  include_index_period = TRUE,
  ...,
  overlap_methods = 8,
  overlap_method = 8,
  x
)

Arguments

df

[data.frame]. Deprecated. One or more datasets appended together. See Details.

...

Arguments passed to episodes.

episode_type

[character]. Options are "fixed" (default), "rolling" or "recursive". See Details.

date

[date|datetime|integer|number_line]. Event date or period.

case_length

[integer|number_line]. Duration from index event distinguishing one "case" from another. This is the case window.

episode_unit

[character]. Time units for case_length and recurrence_length. Options are "seconds", "minutes", "hours", "days" (default), "weeks", "months" or "years". See diyar::episode_unit.

to_s4

[logical]. Deprecated. Output type - epid (TRUE) or data.frame (FALSE).

case_overlap_methods

[character|integer]. Methods of overlap considered when tracking duplicates of "case" events. See (overlaps)

deduplicate

[logical]. Deprecated. If TRUE, "duplicate" events are excluded from the epid.

display

[character]. The progress messages printed on screen. Options are; "none" (default), "progress", "stats", "none_with_report", "progress_with_report" or "stats_with_report".

bi_direction

[logical]. Deprecated. If TRUE, "duplicate" events before and after the index event are tracked.

recurrence_length

[integer|number_line]. Duration from the last "duplicate" event distinguishing a "recurrent" event from its index event. This is the recurrence window.

recurrence_overlap_methods

[character|integer]. Methods of overlap considered when tracking duplicates of "recurrent" events. See (overlaps)

include_index_period

[logical]. Deprecated. If TRUE, events overlapping with the index event or period are linked even if they are outside the cut-off period.

overlap_methods

[character]. Deprecated. Please use case_overlap_methods or recurrence_overlap_methods. Methods of overlap considered when tracking duplicate event. See (overlaps)

overlap_method

[character]. Deprecated. Please use case_overlap_methods or recurrence_overlap_methods. Methods of overlap considered when tracking event. All event are checked by the same set of overlap_method.

x

[date|datetime|integer|number_line]. Deprecated. Record date or period. Please use date.

Details

These functions are superseded. Moving forward, please use episodes.

Value

epid; list

See Also

episodes


[Package diyar version 0.4.1 Index]