R/get_revision.R

Defines functions get_revision

Documented in get_revision

#' Get the revision number
#'
#' @param wb The path to the Tableau workbook file [.twb].
#'
#' @return The revision number
#' @export
#'
#' @family xml
get_revision <- function(wb) {
  proc <- make_rootnodes(wb)

  nodenames <- get_nodenames(proc)

  xy <- which(nodenames == "repository-location")

  Revision <- cbind(XML::xpathSApply(proc[[xy]], ".", XML::xmlGetAttr, "revision"))
  return(as.double(Revision))
}

Try the vvtableau package in your browser

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

vvtableau documentation built on Sept. 11, 2024, 6:51 p.m.