R/version.R

Defines functions reactlog_upgrade

reactlog_upgrade <- function(log) {
  version <- attr(log, "version")
  if (is.null(version)) {
    stop("'log' is missing a 'version' attribute.  This is required.")
  }
  version <- as.character(version)
  if (identical(version, "1")) {
    return(log)
  }

  stop(
    "Versions available: 1\n",
    "Latest reactlog version: 1\n",
    "Version provided: ", version
  )
}

Try the reactlog package in your browser

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

reactlog documentation built on Sept. 26, 2022, 5:05 p.m.