Re: [R] function which returns number of occurrences of a pattern in string

2016-10-24 Thread Jan Kacaba
Bob and Max, I thank you. It helped me much. 2016-10-21 3:47 GMT+02:00 Bob Rudis : > `stringi::stri_count()` > > I know that the `stringr` pkg saves some typing (it wraps the > `stringi` pkg), but you should really just use the `stringi` package. > It has many more very useful

Re: [R] function which returns number of occurrences of a pattern in string

2016-10-20 Thread Bob Rudis
`stringi::stri_count()` I know that the `stringr` pkg saves some typing (it wraps the `stringi` pkg), but you should really just use the `stringi` package. It has many more very useful functions with not too much more typing. On Thu, Oct 20, 2016 at 5:47 PM, Jan Kacaba

Re: [R] function which returns number of occurrences of a pattern in string

2016-10-20 Thread Mark Sharp
Jan, Within the stringr package you can find the function str_count(). Mark R. Mark Sharp, Ph.D. Director of Primate Records Database Southwest National Primate Research Center Texas Biomedical Research Institute P.O. Box 760549 San Antonio, TX 78245-0549 Telephone: (210)258-9476 e-mail:

[R] function which returns number of occurrences of a pattern in string

2016-10-20 Thread Jan Kacaba
Hello dear R-help I tried to find function which returns number of occurrences of a pattern in string. The closest match I've found is str_locate_all in stringr package. I can use str_locate_all but write my function but I don't want reinvent wheel. JK [[alternative HTML version