Greg Minshall <minsh...@umich.edu> writes:
list(1,2,3)
[[1]]
[1] 1

[[2]]
[1] 2

[[3]]
[1] 3

c(1,2,3)
[1] 1 2 3
----
(where =c= is the "concatenation operator".)

so, to me, at least, "proper list" is not a well-defined term in R.

cheers, Greg

=c= is "a generic function which combines its arguments" according to the R documentation. It could do different things depending on the input.

=list()= will create an actual R list which are "Generic Vectors" according to the R documentation. Each element of a list can be any other R data structure including other lists, expressions and symbols.

"Proper list" in the context of this discussion and pertaining to R would be a =list()=, not a vector which is what is usually returned by =c()=. A =data.frame()= is a special case of a =list()= where every column has to have the same length.


Johan

--
Johan Tolö

Reply via email to