search for: str_count

Displaying 13 results from an estimated 13 matches for "str_count".

Did you mean: hdr_count
2013 Feb 15
2
data formatting
...6 1911.07.15?????? 8.06 1911.07.16?????? 8.13 1911.08.17????? 12.90 1911.08.18?????? 5.45 1911.09.19?????? 3.26 1911.09.20?????? 5.70 1911.10.21?????? 9.24 1911.10.22?????? 7.60 1911.11.23????? 14.82 1911.12.24????? 14.10"))? Lines2<-Lines1[Lines1!=""] library(stringr) ?str_count(Lines2, " ") # [1] 7 7 7 7 6 7 7 7 7 7 6 6 7 7 7 7 6 7 7 7 7 7 6 6 Lines2[str_count(Lines2," ")==7]<- str_replace(Lines2[str_count(Lines2," ")==7],"\\s+","???? ") #reduced 2 spaces ?Lines2[str_count(Lines2," ")==6]<- str_replace(L...
2017 Sep 28
2
Searching for Enumerated Items using str_count() from the stringr package
Hi all, I have a large number of text strings to search for enumerated items. However, I am receiving this error message even though I thought that I properly escaped the special character closed parenthesis: > Count<-str_count(text3,keywords) Error in stri_count_regex(string, pattern, opts_regex = opts(pattern)) : Syntax error in regexp pattern. (U_REGEX_RULE_SYNTAX) === Here is example code: text1<-"This is a list: 1) Number 1 2) Etc 3) Etc" text2<-"This is NOT a list: Blah, blah, blah Blah,...
2013 Sep 30
1
str_count counts the substring
I am trying to count the number of times a word occurs in a string. and using str_count function from the package stringr. This function counts the substrings as well. Is there a way in which I can exclude the substring count and just take the exact match. Thanks in advance. -- Thanks and Regards Agrima Srivastava -------------------------------------------------------------------...
2017 Sep 28
0
Searching for Enumerated Items using str_count() from the stringr package
...8/2017 10:25 PM, Dan Abner wrote: > Hi all, > > I have a large number of text strings to search for enumerated items. > However, I am receiving this error message even though I thought that I > properly escaped the special character closed parenthesis: > > >> Count<-str_count(text3,keywords) > Error in stri_count_regex(string, pattern, opts_regex = opts(pattern)) : > Syntax error in regexp pattern. (U_REGEX_RULE_SYNTAX) > > > === > > Here is example code: > > > text1<-"This is a list: > 1) Number 1 > 2) Etc > 3) Etc...
2013 Sep 06
2
Alignment of data sets
Hi all; I have a data set with the format below: Year, Day, Hour, Value 2010, 001, 0, 15.9 2010, 001, 1, 7.3 2010, 001, 2, 5.2 2010, 001, 3, 8.0 2010, 001, 4, 0.0 2010, 001, 5, 12.1 2010, 001, 6, 11.6 2010, 001, 7, 13.9 2010, 001, 8, 11.9 2010, 001, 9, 13.6 2010, 001, 10, 16.1 2010, 001, 11, 18.5 That should
2013 Apr 10
2
grup function
Hello, How can i mattch blanks within words, when i have more phrases? c("Shangh i", "Hello here i am","h llo") > gsub(" ","a",c("Shangh i", "Hello here i am","h llo")) [1] "Shanghai" "Helloahereaiaam" "hallo" I would like to have [1] "Shanghai" "Hello here
2018 May 23
2
Pasar palabras de una lista a una variable del dataframe
Muchas gracias Carlos, Me da error al hacerlo. Mi variable donde quiero que localice las palabras de la lista tiene más de una palabra, no se si puede ser por eso. Gracias El Mar, 22 de Mayo de 2018, 20:15, Carlos Ortega escribió: > Hola, > > Aquí tienes un ejemplo (reproducible)... > > #----------------------- >> # Generar nombres de mujer >> library(randNames)
2018 Feb 07
4
Contar comas de una variable
Buenas tardes, Necesito contar cuántas comas hay en cada celda. Los datos tienen esta forma: Pros Comas Opinión 1 calidad, 1 Opinión 2 calidad, diseño, color, 3 Opinión 3 precio, accesibilidad, sienta bien, luminoso, 4 La variable Pros es la que tengo y la variable Comas es la
2011 Jul 01
0
stringr 0.5
...function which gives `strwrap` output in a more convenient format * new `word` function extract words from a string given user defined separator (thanks to suggestion by David Cooper) * `str_locate` now returns consistent type when matching empty string (thanks to Stavros Macrakis) * new `str_count` counts number of matches in a string. * `str_pad` and `str_trim` receive performance tweaks - for large vectors this should give at least a two order of magnitude speed up * str_length returns NA for invalid multibyte strings * fix small bug in internal `recyclable` function -- Assistant P...
2011 Jul 01
0
stringr 0.5
...function which gives `strwrap` output in a more convenient format * new `word` function extract words from a string given user defined separator (thanks to suggestion by David Cooper) * `str_locate` now returns consistent type when matching empty string (thanks to Stavros Macrakis) * new `str_count` counts number of matches in a string. * `str_pad` and `str_trim` receive performance tweaks - for large vectors this should give at least a two order of magnitude speed up * str_length returns NA for invalid multibyte strings * fix small bug in internal `recyclable` function -- Assistant P...
2018 Feb 15
2
Pasar una lista de palabras por una variable del dataframe
Hola, Tengo un grupo de 600 palabras que he recogido en una lista en R llamada "Atributos". Necesito saber cuántas veces cualquiera de esas palabras aparece en cada observación de la variable "Opinion" del dataframe "Datos", esta es una variable de texto. ¿Qué paquete se usaría? Gracias!
2013 Mar 14
3
Working with string
Hello again, Let say I have following string: Vec <- c("sada", "asdsa", "sa") Now I want to make each element of this vector with equal length. Basically I want following vector: c("sada ", "asdsa", "sa ") Therefore we can get: > nchar(c("sada ", "asdsa", "sa ")) [1] 5 5 5 Is there any
2011 Dec 01
2
Counting the occurences of a charater within a string
I am new to R but am experienced SAS user and I was hoping to get some help on counting the occurrences of a character within a string at a row level. My dataframe, x, is structured as below: Col1 abc/def ghi/jkl/mno I found this code on the board but it counts all occurrences of "/" in the dataframe. chr.pos <- which(unlist(strsplit(x,NULL))=='/') chr.count <-