On Mon, Apr 14, 2008 at 08:32:55PM +0800, Ng Stanley wrote: > Hi, > > Two questions: > > A) Assuming OB is an object, how do I store 20 of OB in a vector or list ?
replicate(20, OB, simplify=FALSE) > B) Does R has something similar associative array to Perl ? For example, > %our_friends = ('best', 'Don', 'good', 'Robert', 'worst', 'Joe'); > $our_friends{'cool'} = "Karen"; our.friends <- list(best="Don", good="Robert", worst="Joe") our.friends[["cool"]] <- "Karen" G. PS. Concerning the second question, what about reading 'Introduction to R'? > Thanks > Stanley > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. -- Csardi Gabor <[EMAIL PROTECTED]> UNIL DGM ______________________________________________ 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.