Re: [R] Concatenate two strings in one in a string matrix

2011-08-19 Thread Eduardo Mendes
Many thanks. The "still untested" worked. Cheers Ed On Fri, Aug 19, 2011 at 11:23 AM, David Winsemius wrote: > > On Aug 19, 2011, at 10:21 AM, David Winsemius wrote: > > >> On Aug 19, 2011, at 9:45 AM, Eduardo Mendes wrote: >> >> Hello >>> >>> Many thanks. >>> >>> * is not a typo. The outp

Re: [R] Concatenate two strings in one in a string matrix

2011-08-19 Thread David Winsemius
On Aug 19, 2011, at 10:21 AM, David Winsemius wrote: On Aug 19, 2011, at 9:45 AM, Eduardo Mendes wrote: Hello Many thanks. * is not a typo. The output is a description of a nonlinear system so terms such as y(k-1)*y(k-2) are allowed. I wonder whether "" could be ignored so that the

Re: [R] Concatenate two strings in one in a string matrix

2011-08-19 Thread David Winsemius
On Aug 19, 2011, at 9:45 AM, Eduardo Mendes wrote: Hello Many thanks. * is not a typo. The output is a description of a nonlinear system so terms such as y(k-1)*y(k-2) are allowed. I wonder whether "" could be ignored so that the outputs such as y_{01}(k-003)* would not show up.

Re: [R] Concatenate two strings in one in a string matrix

2011-08-19 Thread Eduardo Mendes
Hello Many thanks. * is not a typo. The output is a description of a nonlinear system so terms such as y(k-1)*y(k-2) are allowed. I wonder whether "" could be ignored so that the outputs such as y_{01}(k-003)* would not show up. Cheers Ed On Thu, Aug 18, 2011 at 3:40 PM, David Winsemius w

Re: [R] Concatenate two strings in one in a string matrix

2011-08-18 Thread David Winsemius
On Aug 18, 2011, at 2:35 PM, Eduardo Mendes wrote: Dear R-Users I have the following matrix out$desc [,1][,2] [1,] "" "" [2,] "y_{01}(k-001)" "" [3,] "y_{01}(k-002)" "" [4,] "y_{01}(k-003)" "" [5,] "u_{01}(k-001)" "" [6,] "u_{01}(k-002)" "" [7,] "u_{01}(k-003)"

Re: [R] Concatenate two strings in one in a string matrix

2011-08-18 Thread R. Michael Weylandt
Assuming that the "*" in your [11,] example is a typo, would this work? apply(out$desc,1,paste,collapse="") Hope this helps, Michael Weylandt On Thu, Aug 18, 2011 at 2:35 PM, Eduardo Mendes wrote: > Dear R-Users > > I have the following matrix > > > out$desc [,1][,2] > [1,] "

[R] Concatenate two strings in one in a string matrix

2011-08-18 Thread Eduardo Mendes
Dear R-Users I have the following matrix > out$desc [,1][,2] [1,] "" "" [2,] "y_{01}(k-001)" "" [3,] "y_{01}(k-002)" "" [4,] "y_{01}(k-003)" "" [5,] "u_{01}(k-001)" "" [6,] "u_{01}(k-002)" "" [7,] "u_{01}(k-003)" "" [8,] "y_{01}(k-001)" "y_{01}(k-001)" [9,]