R/NgetFinalResults.R

Defines functions NgetFinalResults

Documented in NgetFinalResults

##
## XML-RPC method: getFinalResults()
##
NgetFinalResults <- function(obj, convert = TRUE){
    if(requireNamespace("XMLRPC", quietly = TRUE)) {
        if (!(class(obj) == "NeosJob")) {
            stop("\nObject 'obj' is not of class 'NeosJob'.\n")
        }
        call <- match.call()
        jobnumber <- obj@jobnumber
        password <- obj@password
        nc <- obj@nc
        ans <- XMLRPC::xml.rpc(url = nc@url, method = "getFinalResults",
                               .args = list(jobnumber = jobnumber, password = password),
                               .convert = FALSE, .opts = nc@curlopts, .curl = nc@curlhandle)
        if(convert){
            tmp <- xmlValue(xmlRoot(xmlParse(ans)))
            tmp <- gsub("\\n", "", tmp)
            class(tmp) <- "base64"
            ans <- base64(tmp)
        }
        res <- new("NeosAns", ans = ans, method = "getFinalResults", call = call, nc = nc)
        return(res)
    } else {
        stop("Package 'XMLRPC' not available, please install first from Omegahat.")
    }
}

Try the rneos package in your browser

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

rneos documentation built on May 31, 2017, 3:11 a.m.