Hi everyone,

I have an array with a variable called comments. I wish to count the number
of subjects whose post-experiment comments contain a string x and then cross
tab this with other variables of interest, ex. age. Does anyone have any
suggestions on how to count unique occurrences of a string embedded within a
variable and cross-tab it with other variables?

I've looked through the help files, etc. One method I tried was to use
strsplit to split comments. I can use this with table to count the number of
occurrences of x, but I can't cross tab this with other variables because
comments is a ragged array after being split.

Thanks in advance,

Stephen
-- 
View this message in context: 
http://www.nabble.com/how-to-count-occurrences-of-string--tp25530083p25530083.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to