search for: unlistlst

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

2011 Oct 03
2
Parsing variable-length delimited strings into a matrix
...,B,C B,B A,AA,C A,B,BB,BBB,B,B into a matrix (or data frame). The catch is that I don't know a priori how many entries there will be in each element, nor how many characters there will be. strsplit(vec,",") gets me a list, but I can't find a way of turning the list into a matrix. unlistlst) destroys the length data and do.call("rbind", lst) fails because of the uneven lengths. It is possible to go through the vector element by element, but that has proved too slow for my purposes. Is there a reasonably quick method of achieving this in a vector-oriented way? Cheers, Ben...