R/placeholder.r

Defines functions is.call.placeholder has.call.placeholder get.placeholder.sym get.placeholder

get.placeholder = function(ps=get.ps()) {
  ph = ps$rps$placeholder
  if (is.null(ph)) return("___")
  ph
}



get.placeholder.sym = function() {
  as.name(".PH_._")
}

has.call.placeholder = function(call) {
  if (!is.character(call)) {
    call = deparse1(call)
  }
  has.substr(call,".PH_._")
}

is.call.placeholder = function(call) {
  if (is.null(call)) return(FALSE)
  if (!is.character(call)) {
    call = deparse1(call)
  }
  isTRUE(call == ".PH_._")
}
skranz/RTutor documentation built on Feb. 7, 2024, 12:53 a.m.