Displaying 1 result from an estimated 1 matches for "newfactorlistaccording".
2011 Mar 16
0
Comparing parts of strings
Hi,
I have a vector of strings (categories), each element of which can be
uniquely found in each element of a much longer vector of about 30 or so
differeint factors. I would like to define another factor variable (drawn
from NewFactorListaccording to which string from "categories" is found in
the longer string of factors. Then I'd do it again, with another set of
categories, and make a table based on the new factors. The last part is
easy, but I've never had luck with string manipulation in R.
for(j in 1:length(categories)...