[R] mapply() gives seg fault

Thomas Lumley tlumley at u.washington.edu
Tue Oct 14 17:49:50 CEST 2003


On Tue, 14 Oct 2003, Robin Hankin wrote:

> Hello everybody.
>
> I've been experimenting with mapply().  Does anyone else have problems with:
>
> R> mapply(rep,times=1:4, MoreArgs=42)
>
> (I get a seg fault).
>

Yes, thanks for reporting this.

You should get an error message instead: the correct syntax would be
mapply(rep, times=1:4, MoreArgs=list(42))

It looks as though just coercing to a list would probably be sufficient.

	-thomas




More information about the R-help mailing list