text_combined: lauri nikkinen laurinikkinenikifi r users dont know make clear ill give try dataframe like x var1var2var3var4 abba bbcb caaa abcc baca ccbb acab bcac cabc df readtabletextconnectionx headert sep df would like sum combinationsoccurences factor letter case variables produce list occurrence matrices example case occurrence matrix first element list factor look like occulist var1 var2 var3 var4 var1 x 0 1 1 var2 0 x 1 2 var3 1 1 x 1 var4 1 2 1 x b etc two rows var2 var4 dfdfvar2a dfvar4a give advice achieve kind list matrices lauri ______________________________________________ rhelprprojectorg mailing list httpsstatethzchmailmanlistinforhelp please read posting guide httpwwwrprojectorgpostingguidehtml provide commented minimal selfcontained reproducible code thu 07 aug 2008 160458 0300 r list occurrence matrices