pryr
diamonds <- ggplot2::diamonds
pryr::object_size(diamonds)
#> 3.46 MB
diamonds2 <- transform(diamonds, price_per_carat = price / carat)
pryr::object_size(diamonds2)
#> 3.89 MB
# Size of both data frames combined
pryr::object_size(diamonds, diamonds2)
#> 3.89 MB