Skip to content
Prev 132174 / 398506 Next

Working with ranges of a list

Dear everybody!
Please find attached a tiny R-program. It returns:
      [,1] [,2]
[1,] 53.55   NA
[2,] 53.55   NA
[3,] 53.55   NA
How can I manage the first column to show the second component not only
of the first list in k??ste but of the second component of every list in
k??ste respectively, such as to get the following array returned:
      [,1] [,2]
[1,] 53.55   NA
[2,] 53.87   NA
[3,] 53.87   NA
Thank you in advance.
yours,
Mag. Ferri Leberl
-------------- n?chster Teil --------------
#Programm zur Erstellung eines Wasserwegenetzplanes

#St??dte
#TLD.Stadtk??rzel<-list("Stadtname",Breite,L??nge)

de.cux<-list("Cuxhaven",53.87,8.7)

de.hl<-list("L??beck",53.87,10.69)
de.hb.br<-list("Bremerhaven",53.55,8.58)

see<-function(orte){
lang<-length(orte)
punkte<-array(,c(lang,2))
punkte[,1]<-orte[[1]][[2[1]]]
punkte
}
k??ste<-(list(de.hb.br,de.cux,de.hl))
see(k??ste)