[R] String to Matrix

2011-02-02 Thread Romildo Martins
Hello, How to convert x into y? x [1] 15, 23, 2, 21, 11, 5 y [,1] [,2] [1,] 15 23 [2,] 232 [3,]221 [4,] 21 11 [5,] 115 Thanks a lot! Romildo [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] String to Matrix

2011-02-02 Thread Henrique Dallazuanna
Try this: embed(scan(textConnection(x), sep = ,), 2) On Wed, Feb 2, 2011 at 10:12 AM, Romildo Martins romildo.mart...@gmail.comwrote: Hello, How to convert x into y? x [1] 15, 23, 2, 21, 11, 5 y [,1] [,2] [1,] 15 23 [2,] 232 [3,]221 [4,] 21 11 [5,]