[Rd] Maybe some bug on sapply and cbind (PR#5628)
Luke Tierney
luke at stat.uiowa.edu
Tue Dec 9 17:09:34 MET 2003
Simpler version seems to be
x <- list(expression(1))
y <- rep(2,1)
.Internal(unlist(x, FALSE, FALSE))
.Internal(cbind(1, y))
Seems to be related to undesirable behavior of unlist when expression
objects are involved;
> unlist(list(expression(1)), recursive = FALSE)
NULL
> unlist(list(expression(1)), recursive = TRUE)
[1] 150684992
luke
On Tue, 9 Dec 2003 brahm at alum.mit.edu wrote:
> I can confirm this bug on Solaris 2.8 running R-1.8.1. Here's a simplified
> version:
>
> y <- list()
> sapply(1, function(i) y[[i]] <- expression(1))
> cbind(1, rep(2,1))
>
> [ Process R segmentation Fault at Tue Dec 9 09:20:33 2003 ]
>
> Curiously, replacing the third line with
> cbind(1, 2)
> does not casue a crash, even though rep(2,1) == 2 !
>
>
> > R.version
> platform sparc-sun-solaris2.8
> arch sparc
> os solaris2.8
> system sparc, solaris2.8
> status
> major 1
> minor 8.1
> year 2003
> month 11
> day 21
> language R
>
--
Luke Tierney
University of Iowa Phone: 319-335-3386
Department of Statistics and Fax: 319-335-3017
Actuarial Science
241 Schaeffer Hall email: luke at stat.uiowa.edu
Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu
More information about the R-devel
mailing list