R/dt__.R

Defines functions dt__set dt__get

#------------------------------------------------------------------------------#
#
#                /$$
#               | $$
#     /$$$$$$  /$$$$$$
#    /$$__  $$|_  $$_/
#   | $$  \ $$  | $$
#   | $$  | $$  | $$ /$$
#   |  $$$$$$$  |  $$$$/
#    \____  $$   \___/
#    /$$  \ $$
#   |  $$$$$$/
#    \______/
#
#  This file is part of the 'rstudio/gt' project.
#
#  Copyright (c) 2018-2024 gt authors
#
#  For full copyright and license information, please look at
#  https://gt.rstudio.com/LICENSE.html
#
#------------------------------------------------------------------------------#


dt__get <- function(data, key) {
  data[[key, exact = TRUE]]
}

dt__set <- function(data, key, value) {
  data[[key]] <- value
  data
}
rstudio/gt documentation built on Nov. 2, 2024, 5:53 p.m.