hannes@ruhrau.de
2002-Dec-28 14:57 UTC
[Rd] dump() behaves unexpectedly with local variables (PR#2400)
Full_Name: Johannes Hüsing Version: 1.6.0.1 OS: Windows 2000 Submission from: (NULL) (132.252.149.100) The following code produces an error:> f <- function() { x <- 4; dump("x") } > f()Error in dump("x") : Object "x" not found In the documentation the limited functionality of the current version of dump() is mentioned. It may be a good idea to give this as an example where dump() does not (yet) work. Greetings Johannes
ripley@stats.ox.ac.uk
2002-Dec-30 10:45 UTC
[Rd] dump() behaves *correctly* with local variables (PR#2400)
This is as expected; it is your expectations which are incorrect. Please read the definition of a bug in the R FAQ. `x' is defined in the environment of the call to dump, and that is not in the search path from inside dump(). Please re-check the R scope rules. It is planned to add an envir argument to dump() from 1.7.x, which will allow you to do this. Note the difference from save(), which does have an envir argument starting at parent.frame(). On Sat, 28 Dec 2002 hannes@ruhrau.de wrote:> Full_Name: Johannes Hüsing > Version: 1.6.0.1No such version!> OS: Windows 2000 > Submission from: (NULL) (132.252.149.100) > > > The following code produces an error: > > > f <- function() { x <- 4; dump("x") } > > f() > Error in dump("x") : Object "x" not found > > In the documentation the limited functionality > of the current version of dump() is mentioned. > It may be a good idea to give this as an example where dump() > does not (yet) work.It should never work. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Apparently Analagous Threads
- smbclient's tar to /dev/null behaves unexpectedly
- [PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands
- [PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands
- [PATCH 1/3] ipv6: Select fragment id during UFO/GSO segmentation if not set.
- [PATCH 1/3] ipv6: Select fragment id during UFO/GSO segmentation if not set.