> Is there a way to use the cycle variable for rowname?
> 
> v=1:6
> for (a in 1:3){
>  for  (b in 4:5) {
>   v=rbind(v,a.b=1)
>  }
> }
> v
> 
> This above obviously does not work, but I couldn't find out how to use a 
and
> b to construct a rowname like 14, 15, 24, 25.

Not pretty, but this does the trick.

v=1:6
nam <- "?"
for (a in 1:3){
   for  (b in 4:5) {
      v <- rbind(v,1)
      nam <- c(nam, paste(a,b,sep="."))
   }
}
rownames(v) <- nam
v

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}

______________________________________________
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