Try this: l <- list(i + 1) names(l) <- i
On Mon, Aug 24, 2009 at 4:01 PM, rami jiossy <sra...@hotmail.com> wrote: > > Hi; > > assume i<-10 > > how can i create a list having key=10 and value=11 > > list(i=11) generates a list with > > 'i' > [1] 11 > > and not > > 10 > [1] 11 > > any help? > > Thanks > > _________________________________________________________________ > > Facebook. > > :ON:WL:en-US:SI_SB_facebook:082009 > [[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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[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.