1 Goal


The goal of this tutorial is to get the size in memory of a dataframe or object.


2 Data import


# First we load the libraries
library("pryr")


# In this tutorial we are going to use the iris dataset
data("iris")

3 Getting the size of an object


# We calculate the size of an object using the object_size function from the pryr library
object_size(iris)
## 7.2 kB

4 Conclusion


In this tutorial we have learnt how to get the size of an object using the pryr library.