Re: R-alpha: Misc problems

Martin Maechler (
Mon, 17 Feb 97 15:07:04 +0100

Date: Mon, 17 Feb 97 15:07:04 +0100
Message-Id: <9702171407.AA00523@>
From: Martin Maechler <>
In-Reply-To: <> (message from Jim Lindsey on
Subject: Re: R-alpha: Misc problems

>>>>> "Jim" == Jim Lindsey <> writes:

    Jim> 1. The S books often give examples using something like this:
    Jim>   u <- list()
    Jim>   u[[1]] <- a

    Jim> In R this gives subscript out of bounds (also character, vector, etc.)

I think that R is okay here;
Why using unnamed lists anyway?
In the above example, you can do

	u $  <-  a

A similar issue (which was discussed on this list a while ago):

	x    <- 1:4
	x[6] <- 6

works in S, but not in R.
The decision was that R should help you to detect programming errors.
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: