make_link: Make a Clarity link using an 'ID' column

make_linkR Documentation

Description

If used in a datatable, set escape = FALSE

Usage

make_link(ID, link_text, type = NULL, chr = TRUE)

Arguments

ID

(character) The ID column. See the list below for the appropriate matching ID. If link_text is:

  • UniqueID PersonalID

  • EnrollmentID PersonalID

  • ProjectName ProjectID

  • AgencyName AgencyID

link_text

(character) The link text. Typically UniqueID/EnrollmentID/AgencyName/ProjectName column

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

(character/shiny.tag) If chr = TRUE a character vector, if chr = FALSE a shiny.tag.

Examples

data.frame(a = letters, b = seq_along(letters)) |>
  dplyr::mutate(a = make_link(ID = b, link_text = a, type = "profile"))

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