stringi Questions

2

Solved

Karl Broman's post: https://kbroman.wordpress.com/2015/06/22/randomized-hobbit-2/ got me playing with regex and ngrams just for fun. I attempted to use regex to extract 2-grams. I know there are pa...
Sarsaparilla asked 23/6, 2015 at 12:40

3

Using stringr package, it is easy to perform regex replacement in a vectorized manner. Question: How can I do the following: Replace every word in hello,world??your,make|[]world,hello,pos to ...
Guernica asked 1/5, 2015 at 23:48

1

I've been using gsub extensively lately, and I noticed that short patterns run faster than long ones, which is not surprising. Here's a fully reproducible code: library(microbenchmark) set.seed(12...
Schram asked 17/12, 2014 at 20:29

2

Solved

Edited df and dict I have a data frame containing sentences: df <- data_frame(text = c("I love pandas", "I hate monkeys", "pandas pandas pandas", "monkeys monkeys")) And a dictionary contai...
Sectional asked 21/1, 2015 at 5:0

2

Solved

I'm trying to use the stringi package to split on a delimiter (potentially the delimiter is repeated) yet keep the delimiter. This is similar to this question I asked moons ago: R split on delimite...
Starrstarred asked 22/10, 2014 at 14:19

2

I'm trying to remove non-alphabet characters from a vector of strings. I thought the [:punct:] grouping would cover it, but it seems to ignore the +. Does this belong to another group of characters...
Evangel asked 13/10, 2014 at 20:48

© 2022 - 2024 — McMap. All rights reserved.