From ripley at stats.ox.ac.uk  Fri Oct 29 09:17:26 2010
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 29 Oct 2010 08:17:26 +0100 (BST)
Subject: [Rd] list2env() is broken
In-Reply-To: <4CCA613D.3050802@fhcrc.org>
References: <4CCA613D.3050802@fhcrc.org>
Message-ID: <alpine.LFD.2.00.1010290812150.1613@gannet.stats.ox.ac.uk>

I have no idea what 'timeout' means, but that *should* take an 
extraordinarily long time (it is at least quadratic in the input 
length).  This is the point of hashing -- you *need* hash=TRUE, and 
you should probably also set 'size' in new.env.

There was an obvious missing PROTECT in this function.

I do wonder if you are yet familiar with the debugging tools described 
in 'Writing R Extensions' -- please do use them before reporting.

On Thu, 28 Oct 2010, Herv? Pag?s wrote:

> Hi,
>
> The following code produces different kinds of problems depending
> on which platform you run it:
>
>  x <- as.list(1:200000)
>  names(x) <- paste("A", 1:200000, sep="")
>  e <- list2env(x)
>
> Timeout on Linux, crash on Mac and Windows, with R 2.12.0 and
> current R devel.
>
> The "multi-assign" mode (i.e. when the 'envir' arg is supplied)
> doesn't seem to have this problem.
>
> Cheers,
> H.
>
> -- 
> Herv? Pag?s
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M2-B876
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpages at fhcrc.org
> Phone:  (206) 667-5791
> Fax:    (206) 667-1319
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at 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


[Rd] list2env() is broken
Prof Brian Ripley