On Sep 18, 2008, at 6:25 AM, Ralikwen wrote:
Thanks for your help,
I didn't know where you can or can't use a for variable.
Seems that I have to use rownames to do this anyway, so finally I
went for a
more procedural solution:
v=1:6
for (a in 1:3){
for (b in 4:5) {
v<-rbind(v,1+a+b:
Thanks for your help,
I didn't know where you can or can't use a for variable.
Seems that I have to use rownames to do this anyway, so finally I went for a
more procedural solution:
v=1:6
for (a in 1:3){
for (b in 4:5) {
v<-rbind(v,1+a+b:6+a+b)
rownames(v)[nrow(v)]= paste(a,b,sep="
On 17-Sep-08 14:22:11, Ralikwen wrote:
>
> 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 1
> 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 t
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.
Thanks for the help.
Balazs
--
View this message in
5 matches
Mail list logo