[R] problem with list

Houix Olivier houix at ircam.fr
Fri Oct 27 14:22:26 CEST 2000


Thanks
the second proposal works:
l <- c(l,list(unlist(l)))
because I use this for the calculation of the ultrametric distance 
derived from hclust.

Olivier Houix 
 
Peter Dalgaard BSA wrote:
> 
> Houix Olivier <houix at ircam.fr> writes:
> 
> > Hello,
> > I've some problems to concatenate elements of a list:
> > > s1
> > [1] 1 2 3 4
> > > s2
> > [1] 6 7
> ....
> > > l
> > [[1]]
> > [1] 1 2 3 4
> >
> > [[2]]
> > [1] 6 7
> > [[3]]
> > [1] 1 2 3 4 6 7 ## l[1] with  l[2]
> >
> > Someone can help me?
> 
> Not sure I know where you're getting at, but what about
> 
> list(s1,s1,c(s1,s2))
> 
> or if you want a more general, sneakier solution
> 
> l <- c(l,list(unlist(l)))
> 
> --
>    O__  ---- Peter Dalgaard             Blegdamsvej 3
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907

-- 
Olivier Houix  <houix at ircam.fr>             tel: 01 44 78 15 51
Equipe Perception et Cognition Musicales    http://www.ircam.fr/  
IRCAM   1 place Igor Stravinsky             75004         Paris
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list