On Mon, Jun 21, 2010 at 4:18 PM, song song <rprojecth...@gmail.com> wrote:
> May I ask how to initialize a list?
>
> usually I will use " result=list(0) "  to do this. is this right?

It works, but it is cleaner to use

results=list()

The difference is that list(0) will have one component that contains
the number zero, whereas list() will simply initialize an empty list
(no components).

Peter

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to