Displaying 2 results from an estimated 2 matches for "ta5".
Did you mean:
a5
2011 Jan 20
4
How to reshape wide format data.frame to long format?
..."AMR.pa3.M" "AMR.pa4.M"
[6] "AMR.pa5.M" "AMR.pa6.M" "AMR.pa7.M" "AMR.pa8.M" "AMR.pa9.M"
[11] "AMR.pa10.M" "AMR.ta1.M" "AMR.ta2.M" "AMR.ta3.M" "AMR.ta4.M"
[16] "AMR.ta5.M" "AMR.ta6.M" "AMR.ta7.M" "AMR.ta8.M" "AMR.ta9.M"
[21] "AMR.ta10.M" "AMR.ka1.M" "AMR.ka2.M" "AMR.ka3.M" "AMR.ka4.M"
[26] "AMR.ka5.M" "AMR.ka6.M" "AMR.ka7.M" "...
2009 Aug 25
1
Filling in empty arrays/lists from using "paste" function
...A3 bb 1
9 idA4 gg 0
10 idA5 ee 5
My desired outputs (5 arrays/lists classified according to distinct "id"
field) are as follow:
> TA1
bb ee gg tt uu
2 0 3 0 0
> TA2
bb ee gg tt uu
0 0 0 0 0
> TA3
bb ee gg tt uu
1 3 0 0 0
...... similarly for TA4 & TA5.
The above results were produced using TA1 <-
c(bb=TA1.bb,ee=TA1.ee,gg=TA1.gg,tt=TA1.tt,uu=TA1.uu), TA2 <-
c(bb=TA2.bb,ee=TA2.ee,gg=TA2.gg,tt=TA2.tt,uu=TA2.uu*)* etc for TA3~TA5.
Although these generate the output I desire, I would like to use a single
statement for producing 5 different arr...