R/pin_methods.R

Defines functions `[<-.pin` c.pin

#' @export
print.pin <- function (x,...) 
{
  print(as.character(x),...)
  cat("Personal identity number(s)")
}

#' @export
`[.pin` <- create_s3_method("[")
#' @export
rep.pin <- create_s3_method("rep")

#' @export
`[<-.pin` <- function(x, ..., value){
  value <- as.pin(value)
  NextMethod()
}

#' @export
c.pin <- function(..., recursive = FALSE){
  args <- list(...)
  if (!length(args)) return(as.pin(character()))
  as.pin(unlist(lapply(args, as.character)))
} 

Try the sweidnumbr package in your browser

Any scripts or data that you put into this service are public.

sweidnumbr documentation built on March 31, 2020, 5:24 p.m.