tag:blogger.com,1999:blog-1699790186532417278.post5745857629367984466..comments2023-06-17T07:40:37.867+02:00Comments on theBioBucket*: Some Simple but Propably Useful Regex Examples with R-Package stringr...Unknownnoreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1699790186532417278.post-15546945333492778192011-11-08T08:54:22.291+01:002011-11-08T08:54:22.291+01:00try yourself and you'll see...
str_extract(sh...try yourself and you'll see...<br /><br />str_extract(shopping_list, "[A-Z](.*)[1-9]")<br />grep("[A-Z](.*)[1-9]", shopping_list)Kayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-64132877731261009312011-11-04T15:53:52.291+01:002011-11-04T15:53:52.291+01:00What is the advantage of using the stringr package...What is the advantage of using the stringr package versus the grep() function in the base library?Andrew Barrhttps://www.blogger.com/profile/10290753627985165338noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-41432991300941192152011-11-04T08:53:45.208+01:002011-11-04T08:53:45.208+01:00..."str_extract" extracts the first piec......"str_extract" extracts the first piece of a string (held within a vector element) matching a pattern, returning a vector containing the matching strings. <br /><br />"str_extract_all" extracts all pieces of a string (held within a vector element) that match a pattern and returns a vector-list, each vector containing all matches with the elements of the input vector.<br /><br />Hope I got this right,<br />KayKayhttps://www.blogger.com/profile/09320307979146470105noreply@blogger.comtag:blogger.com,1999:blog-1699790186532417278.post-17493625192438229632011-11-03T20:35:38.298+01:002011-11-03T20:35:38.298+01:00You might want to show how the function str_extrac...You might want to show how the function str_extract_all compares on the above examplesAndrew Clarkhttp://www.premiersoccerstats.com/wordpressnoreply@blogger.com