From hpages at fredhutch.org  Tue Sep 29 23:42:55 2015
From: hpages at fredhutch.org (=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=)
Date: Tue, 29 Sep 2015 14:42:55 -0700
Subject: [Rd] making object.size() more meaningful on environments?
Message-ID: <560B05DF.9020103@fredhutch.org>

Hi,

Currently object.size() is not very useful on environments as it always
returns 56 bytes, no matter how big the environment is:

   env1 <- new.env()
   object.size(env1)  # 56 bytes

   env2 <- new.env(hash=TRUE, size=75000000L)
   object.size(env2)  # 56 bytes

   env3 <- list2env(list(a=runif(25000000), L=LETTERS))
   object.size(env3)  # 56 bytes

This makes it pretty useless on reference class instances and other
objects that use environments internally for caching or other purposes.

What about changing this and make it return something more meaningful?

Cheers,
H.

-- 
Herv? Pag?s

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



[Rd] making object.size() more meaningful on environments?
=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=