Dear vQ,

vectors (can-be-considered-lists),

can you please stop repeating this nonsense? I don't think anybody ever claimed that vectors can be considered list. It's rather the other way round: lists can also be seen as vectors to R (possibly they are implemented as such, but I don't much about the internals of R).

> a <- as.list(1:10)
> b <- 1:10
> is.vector(a)
[1] TRUE
> is.list(a)
[1] TRUE
> is.vector(b)
[1] TRUE
> is.list(b)
[1] FALSE

Hence the confusion about

> mode(as.vector(a))
[1] "list"

which prompted the original comment that you are taking so much exception to.

as to "it could only work in very specific circumstances" -- no, it
would work for any list whatsoever, provided the user has a correctly
implemented comparator. for example, i'd like to sort a list of vectors
by the vectors' length -- is this a very exotic idea?

Honestly, I can't think of a situation where I would want to do than in R. In a Perl script, quite likely; but this is a kind of data manipulation that R wasn't really designed for IMHO.

Not that I'd mind having sort() operate properly on lists; it just isn't something I miss in the language.

Best,
Stefan

[ stefan.ev...@uos.de | http://purl.org/stefan.evert ]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to