similar to: Stringr Package

Displaying 20 results from an estimated 3000 matches similar to: "Stringr Package"

2013 Jun 08
1
splitting a string column into multiple columns faster
Hello! I have a column in my data frame that I have to split: I have to distill the numbers from the text. Below is my example and my solution. x<-data.frame(x=c("aaa1_bbb1_ccc3","aaa2_bbb3_ccc2","aaa3_bbb2_ccc1")) x library(stringr) out<-as.data.frame(str_split_fixed(x$x,"aaa",2)) out2<-as.data.frame(str_split_fixed(out$V2,"_bbb",2))
2013 Mar 08
3
Word Frequency for each row
Hi All, I am wondering if there is any examples where you can count your interested "word" in each row. For an example if you have data with *'ID*' and '*write-up*' for 100 rows, how would I calculate the word frequency for each row ? Thank you for all your time. [[alternative HTML version deleted]]
2013 Sep 27
2
Locating inefficient code
Hi, I have been using R for a few months and I have this working code. Don't seen any problem but this takes a long time. So if I have about 30000 rows it takes a few minutes. If I have 100000 it does not seem to complete. Original Data: Proto Recv-Q Send-Q Local-Address Foreign-Address State tcp 0 0 172.20.100.2:60255
2012 Jun 27
2
A solution for question about formatting Dates
Hello again: Here is a solution to the dates without leading zeros: pou1 <- function(x) { #Note: x is a data frame #Assume that Column 1 has the date #Column 2 has station #Column 3 has min #Column 4 has max library(stringr) w <- character(length=nrow(x)) z <- str_split(x[,1],"/") for(i in 1:nrow(x)) { u <-
2015 Apr 19
4
running unit tests on the stringr package
I am trying to learn how to run the unit tests in the stringr package and have the following questions. 1) The r-cran-stringr package does not suggest/depend on the r-cran-testthat package . Would it make sense to add such a thing since after all the tests in /usr/lib/R/site-library/stringr/tests rely on testthat package? 2) I am getting the following error when trying to run the unit tests %
2019 Sep 24
2
Consulta
Emilio Ahora cuando quiero instalar los paquetes pdftools, magick y otros más me salen el siguiente error WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ?C:/Users/bdominguez/Documents/R/win-library/3.6? (as ?lib?
2019 Sep 23
5
Consulta
Buenas tarde a todo en s: Tenia la versión de R 3.6 y utilizaba la paquetería de pdftools para extraer información de archivos en pdf actualice la versión 3.6.1 y ya no reconoce la paquetería alguien que me pueda ayudar. Prácticamente no reconoce las funciones de pdftools library(pdftools) library(stringr)? library(NLP)? library(tm)? library(tesseract)? library(magick)?
2013 Jul 15
3
ayuda con stringr
Hola a todos. Soy un poco torpe manejando cadenas de texto, así que os pido ayuda. Tengo un vector de texto de este tipo datos$tipo [1] m.1.p.Álava m.1.p.Albacete [3] m.2.p.Alicante m.1.p.Almería [5] m.3.p.Asturias m.1.p.Ávila [7] m.1.p.Badajoz m.1.p.Baleares (Illes) [9] m.1.p.Barcelona m.1.p.Burgos [11] m.1.p.Cáceres m.1.p.Cádiz Y quiero extraer el
2013 Apr 22
1
Print occurrence / positions of words
Hi, May be this helps: vec<- "this is a nice text with nice characters" library(stringr) ?vec2<-unlist(str_match_all(vec,"\\w+")) #or # vec2<-str_split(vec," ")[[1]] res<-unique(lapply(vec2,function(x) which(!is.na(match(vec2,x))))) ?names(res)<- unique(vec2) res #$this #[1] 1 # #$is #[1] 2 # #$a #[1] 3 # #$nice #[1] 4 7 # #$text #[1] 5 # #$with #[1]
2017 Sep 28
0
Searching for Enumerated Items using str_count() from the stringr package
On 09/28/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 =
2015 Apr 20
0
running unit tests on the stringr package
Dear Raju I agree to Dirk that this is not really the best place for these matters, but as I got curious, I checked and found you should use test_package() and not test_dir(), as the latter does not load unexported functions of the package (such as check_string()) that may occur in the tests. For packaging of r-cran-stringr, it is probably most efficient to file a bug report there because of
2015 Jan 14
3
Abreviado de especies
Hola, Vaya desastre al mandar la cabecera de la base de datos. Al enviarlo, se veía bien, pero está visto que por el camino la cosa se torció. Siguiendo el consejo de Javier, he subido un pequeño fragmento al DropBox. He quitado algunas especies para no hacerlo muy largo. Espero que ésta vez no haya problemas. https://www.dropbox.com/s/q7zla50oq7owg8k/CPUE.csv?dl=0 Un saludo y gracias Juan
2010 Aug 25
0
stringr: version 0.4
Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that are easy to
2010 Aug 25
0
stringr: version 0.4
Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that are easy to
2013 Apr 16
3
Splitting the Elements of character vector
Dear R forum I have a data.frame df = data.frame(currency_type = c("EURO_o_n", "EURO_o_n", "EURO_1w", "EURO_1w", "USD_o_n", "USD_o_n", "USD_1w", "USD_1w"), rates = c(0.47, 0.475, 0.461, 0.464, 1.21, 1.19, 1.41, 1.43))   currency_type     rates 1      EURO_o_n   0.470 2      EURO_o_n   0.475 3       EURO_1w   0.461
2011 Jul 01
0
stringr 0.5
# stringr Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that
2011 Jul 01
0
stringr 0.5
# stringr Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that
2011 Dec 09
0
stringr 0.6
# stringr Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that
2011 Dec 09
0
stringr 0.6
# stringr Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparations tasks. R provides a solid set of string operations, but because they have grown organically over time, they can be inconsistent and a little hard to learn. Additionally, they lag behind the string operations in other programming languages, so that some things that
2011 Oct 25
0
Installing rgeos on Mac OS X 10.4 (was Re: "package 'stringr' does not have a name space"
I figured it out, at least enough to get rgeos's gSimplify function to work, which was my original goal; the stringr problem was with 0.2, however I got stringr 0.5 to install by changing the minimum version in DESCRIPTION from R2.11 to R 2.10. ... Thanks for the help! ############# # This is how I got rgeos to install in R GUI on my Intel Mac OS X 10.4: ############# # stringr