Re: [R] Making a table: collapsing across sub-strings

2007-10-04 Thread jim holtman
How many strings are there? Now you could use 'outer' and 'regexpr' to determine which strings are subsets of another and then group them. So knowing the possible number of strings that you will be searching with and how you might want a hierarchy printed out would help in coming up with a soluti

Re: [R] Making a table: collapsing across sub-strings

2007-10-04 Thread Dieter Vanderelst
Hi, A sub string can occur anywhere in the main string. I think I could use TABLE and than add the numbers. But I don't know how to access the numbers in the result of table. Another problem is that there might be a hierarchy in the strings. This is, string a might be a subset of b while b mig

Re: [R] Making a table: collapsing across sub-strings

2007-10-03 Thread jim holtman
How do you determine if one string is a subset of another? Does it only match at the beginning, or anywhere? How large is your set of strings? Can you use table as you describe and then determine what the groupings of subsets are and then just add the numbers together? You can use grep/regexpr t