R/object_size.R

Defines functions object_size

Documented in object_size

#' @title Nice printing of report the Space Allocated for an Object
#' @description Provides an estimate of the memory that is being used to store an R object.
#' A wrapper of `object.size`, but use a nicer printing unit.
#' @param object an R object.
#' @return An object of class "object_size"
#' @examples
#'
#' iris %>% object_size()
#'

#' @export
object_size = function(object){
  object.size(object) %>% print(unit = "auto")
}

Try the tidyft package in your browser

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

tidyft documentation built on April 14, 2020, 7:10 p.m.