R/checkInputFile.R

Defines functions checkInputFile

#' Utility method; create temporary file if necessary
#' 
#' @param file a string or XMLInternalDocument
#' @return location of file 
#' 
#' @concept paxtoolsr
#' @noRd
checkInputFile <- function(file) {
    if(typeof(file) == "externalptr") {
        tmp <- tempfile()
        saveXML(file, tmp)
        
        file <- tmp
    }
    
    return(file)
}

Try the paxtoolsr package in your browser

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

paxtoolsr documentation built on Nov. 8, 2020, 8:29 p.m.