similar to: Invalid Regular Expression

Displaying 15 results from an estimated 15 matches similar to: "Invalid Regular Expression"

2011 Jun 09
1
Error: missing values where TRUE/FALSE needed
I'm writing a function and keep getting the following error message. myfunc <- function(lst) { lst <- list(roots = c("car insurance", "auto insurance"), roots2 = c("insurance"), prefix = c("cheap", "budget"), prefix2 = c("low cost"), suffix = c("quote", "quotes"), suffix2 = c("rate",
2011 Jun 09
2
Problem with a if statement inside a function
I have a really long functions, and at the end of the function, I am using a if statement to tag certain keywords based on whether they have certain values contained in them. However, the if statement doesn't seem to work. When I had split up the commands into various functions, it worked fine, but I'm not sure what going on now that it's combined into a single function. myfunc
2020 Oct 18
1
Resultado de la consola como un tibble
Hola, Bueno, puedes hacer el cálculo de una forma mucho más compacta y rápida. Esta forma es especialmente recomendable cuando tienes muchas columnas y muchas filas. > library(data.table) > myDT <- as.data.table(mtcars) > myDTlong <- melt(myDT, measure.vars=1:ncol(myDT)) > myDTlong[ , list(p_value = shapiro.test(value)$p.value, v_stat = shapiro.test(value)$statistic) , by
2023 Mar 21
1
preguntas múltiples y creación de variables
Buenas, las imágenes no se ven por lo que no puedo reproducir tu ejemplo, pero tal vez lo siguiente te valga: > library('stringr') > d <- data.frame(respuestas = c('manzana, naranja', 'manzana, melocotón', 'naranja, melocotón')) > d respuestas 1 manzana, naranja 2 manzana, melocotón 3 naranja, melocotón > d$manzana <-
2016 Apr 28
2
Combinaciones sin repetición...con restricciones
Hola, Carlos. Primero, muchas gracias por el código. No es exactamente lo que quería, porque la parte "Detección de presencia de "cual_1" y "cual_2"... no excluye aquellas combinaciones en las que está presente también el objeto c, pero me ha servido de base e inspiración para elaborar otro código. He copiado la primera parte de tu función, para crear todas las
2013 Mar 20
2
Pattern match
Hello again, in the help page of grep() function, it is written that pattern: character string containing a regular expression (or character string for fixed = TRUE) to be matched in the given character vector. Coerced by as.character to a character string if possible. If a character vector of length 2 or more is supplied, the first element is used with a warning. Missing values are allowed
2011 Jun 09
1
Trying to make code more efficient
I have a repetative task in R and i'm trying to find a more efficient way to perform the following task. lst <- list(roots = c("car insurance", "auto insurance"), roots2 = c("insurance"), prefix = c("cheap", "budget"), prefix2 = c("low cost"), suffix = c("quote", "quotes"),
2020 Oct 18
2
Resultado de la consola como un tibble
Buen día estimados Estoy tratando de hacer un tibble con los resultados de un apply que se muestran en la consola que me da R, no estoy seguro si eso se pueda hacer, pero me gustaría organizar los resultados de esa manera. mi código es: data("mtcars") Mtcars_matriz <- as.matrix(mtcars) apply(Mtcars_matriz, MARGIN =2, FUN = shapiro.test) DF2 <- tibble(Variable = NA, W = NA, Pvalue =
2020 Oct 18
0
Resultado de la consola como un tibble
Hola, No hace falta (en este caso) capturarlo de la consola. El resultado de la función apply se puede capturar y procesar. > data("mtcars") > # Mtcars_matriz <- as.matrix(mtcars) > res_out <- apply(mtcars, MARGIN =2, FUN = shapiro.test) > > > res_df <- as.data.frame(unlist(res_out)) > res_df$vars <- rownames(res_df) > rownames(res_df) <- NULL
2013 Feb 01
4
Scrapping con R
Buenas tardes a todos: No sé si alguno de vosotros sabe si con R es posible buscar una palabra en una web (por ejemplo, buscar "Alicante" en www.lasprovincias.es) y que, cada vez que lo encuentre, vaya almacenado las urls en un data.frame gracias de antemano! -- Beatriz Martínez [[alternative HTML version deleted]]
2017 Jul 30
0
How to replace match words whith colum name of data frame?
Try the stringr package. This should work chemical=c("basic", "alkalin", "alkali", "acid", " ph ", "hss") chemical_match <- str_c(chemical, collapse = "|") chemical_match concept_df$match[str_detect(concept_df$concept, chemical_match)] <- "chemical" concept_df > concept_df concept match
2016 Apr 27
4
Combinaciones sin repetición...con restricciones
Hola, tengo que resolver un problema para el que normalmente utilizaría excel, pero me gustaría intentar resolverlo con R. Se trata de lo siguiente: Tengo tres elementos: a, b y c. Dichos elementos están agrupados en siete objetos, producto de todas las combinaciones sin repetición posibles: Objeto 1: a Objeto 2: b Objeto 3: c Objeto 4: a y b Objeto 5: a y c Objeto 6: b y c Objeto 7: a, b y c
2017 Nov 01
1
Creating Tag
i want to tag categories to its menuname. i have a csv containing menu item name and in other csv i have a column containing some strings, i want to pick that strings from categories and look into menu items if any menu item containing that string i want to create a new column next to menu item name flagged as 1 otherwise 0 and the only condition is once a menu item flagged as 1 i don't need
1999 Sep 13
0
Finding Samba services on the network from Win 9x clients
I've installed Samba version 2.0.5a on Linux kernel 2.0.36 (both smbd and nmbd are running). I've set the netbios name to "lion" and now I want Windows 9x clients to connect to it like this (from START->RUN): net use w: \\lion\dougl ? I get this: "Error 53: The computer name specified in the network path cannot be located. Make sure you are specifying the computer
2012 Mar 08
18
some fixes, improvements, and new features (EPO and DYING) for NUT
Here are a series of my recent changes to NUT. The first few in the set are primarily little fixes and improvements. In among those are a few for .gitignore files which of course you can ignore for SVN, and there's one for a commit to a generated file which of course should not be tracked in any VCS. Then there are a couple or three to do with generating the header files used by