search for: foresnat2

Displaying 1 result from an estimated 1 matches for "foresnat2".

2010 Mar 10
1
Joining elements of an array into a single element
...e been trying like for hours but I cannot solve this. I wonder if you could give me a hand. I would like to combine the following elements of an array which I must generate in order to get the syntax I need for another software, lets say: c<-c(1:7) zest<-c(12,34,45,132,56,23,6) p<-"[foresnat2]" for(i in 1:7){tre[i]<-paste("con(",p," == ",c[i],", ",zest[i],", ",sep="")} [1] "con([foresnat2] == 1, 12, " [1] "con([foresnat2] == 2, 34, " [1] "con([foresnat2] == 3, 45, " [1] "con([foresnat2] == 4,...