R/get_volume.R

Defines functions get_volume.HypervolumeList get_volume.Hypervolume

Documented in get_volume.Hypervolume get_volume.HypervolumeList

get_volume.Hypervolume <- function(object)
{
  result = object@Volume
  names(result) = object@Name
  
  return(result)
}

get_volume.HypervolumeList <- function(object)
{
  result = sapply(object@HVList, get_volume.Hypervolume)
  names(result) = sapply(object@HVList, function(x) {x@Name})
  return(result)
} 


setGeneric("get_volume", function(object) {})
setMethod("get_volume","Hypervolume", function(object) {get_volume.Hypervolume(object)})
setMethod("get_volume","HypervolumeList", function(object) {get_volume.HypervolumeList(object)})

Try the hypervolume package in your browser

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

hypervolume documentation built on Sept. 14, 2023, 5:08 p.m.