make_linked_df: Make UniqueID or EnrollmentID into a Clarity hyperlink

make_linked_dfR Documentation

Make UniqueID or EnrollmentID into a Clarity hyperlink

Description

Make UniqueID or EnrollmentID into a Clarity hyperlink

Usage

make_linked_df(
  .data,
  link_text,
  unlink = FALSE,
  new_ID,
  type = NULL,
  chr = TRUE
)

Arguments

.data

(data.frame) The following columns are required for the specified link type:

  • PersonalID & UniqueID for Profile link

  • PersonalID & EnrollmentID for Enrollment link

  • PersonalID & EnrollmentID for Enrollment link

link_text

(name) unquoted of the column to unlink.

unlink

(logical) Whether to turn the link back into the respective columns from which it was made.

new_ID

(name) unquoted of the column to be created with the data from the linked column. (PersonalID will be recreated automatically if it doesn't exist).

type

(character) the type of link to create based on link_text. One of:

  • "profile" When link_text is UniqueID

  • "enrollment" When link_text is EnrollmentID

  • "agency_switch" When link_text is AgencyName

  • "program_edit" When link_text is ProgramName

chr

(logical) Whether to output a character or a shiny.tag if FALSE. Default TRUE

Value

(data.frame) With UniqueID or EnrollmentID as a link data.frame(a = letters, b = seq_along(letters)) |> dplyr::mutate(a = make_link(a, b)) |> make_linked_df(a, unlink = TRUE)


COHHIO/clarity.looker documentation built on Sept. 6, 2024, 1:47 a.m.