From ec4140a9e5ad316b6b173b2938a077d352764bae Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Sun, 4 Oct 2020 15:56:36 -0500 Subject: [PATCH] Update object size Fixes #698 --- vectors.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vectors.Rmd b/vectors.Rmd index f7baedd..2b4be16 100644 --- a/vectors.Rmd +++ b/vectors.Rmd @@ -129,7 +129,7 @@ y <- rep(x, 1000) pryr::object_size(y) ``` -`y` doesn't take up 1,000x as much memory as `x`, because each element of `y` is just a pointer to that same string. A pointer is 8 bytes, so 1000 pointers to a 136 B string is 8 * 1000 + 136 = 8.13 kB. +`y` doesn't take up 1,000x as much memory as `x`, because each element of `y` is just a pointer to that same string. A pointer is 8 bytes, so 1000 pointers to a 152 B string is 8 * 1000 + 152 = 8.14 kB. ### Missing values