#' Round-method for MAgPIE objects
#'
#' Round-method for MAgPIE-objects respectively. Works exactly as for arrays.
#'
#'
#' @name round-methods
#' @aliases round-methods round,magpie-method
#' @param x a magpie object
#' @param digits integer indicating the number of decimal places (round) or significant
#' digits (signif) to be used. Negative values are allowed.
#' @docType methods
#' @section Methods: \describe{
#'
#' \item{x = "magpie"}{ works as round(x) for arrays. }
#'
#' }
#' @exportMethod round
setMethod("round",
signature(x = "magpie"),
function (x, digits=0)
{
x@.Data <- round(x@.Data,digits=digits)
return(x)
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.