Skip to content

subscripting in list() (PR#187)

1 message · mao@compstat.wharton.upenn.edu

#
Sorry My previous report is not detailed.

In R, you will get this:
Error in mylist[[1]] : subscript out of bounds
Error: (list) object cannot be coerced to vector type 14
[[1]]
[1] 1

I was trying to assigning c(1) to (mylist[[1]] <- c(1)) -- it seems
impossible if I dont' assign something else to it in advance.

(although a walk around would be mylist[1] <- list(1)) In
SPLUS 4 or 3.4, the reactions are different:
NULL
[[1]]:
[1] 1
On Sun, 9 May 1999, Wenxin Mao wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._