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 tidyfst package in your browser

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

tidyfst documentation built on July 26, 2023, 5:20 p.m.