Displaying 20 results from an estimated 64 matches for "str_replace".
2017 Nov 03
4
Problemas con función factor to integer
...es de función con las que intento que funcione sin resultado.
#Ejemplo
> head(road_accidents$Vehicle_Type,10)
[1] X2 X11 X11 X19 X11 X11 X11 X11 X11 X11
Levels: X10 X11 X17 X19 X2 X20 X21 X3 X4 X5 X8 X9 X90 X97 X98
#Función Prueba 1
get.integer <- function(x)
{
road_accidents %>%
str_replace(road_accidents$x, 'X','') %>%
as.integer(road_accidents$x)
}
#Función Prueba 2
get.integer2 <- function(dataframe, y)
{
vector <- str_replace(dataframe[,y], 'X', '')
vector <- as.integer(dataframe[,y])
dataframe[,y] <- vector
}
#Función Pru...
2006 Jun 22
2
str_replace PHP Function Equiv.
I''ve been searching for ages and not come up with anything on the
internet. I was wondering if there is a Rails equiv. for the PHP
function str_replace. For example;
variable_for_new_string("value_to_repace", "string_to_replace_with",
"string_to_perform_modification_to")
Thanks in advance for any help.
--
Posted via http://www.ruby-forum.com/.
2008 Feb 15
1
function similar to str_replace() in php.
Dear expeRt,
I would like to know whether a function similar to str_replace() in
php exists in R.
Looking forward to hearing from you.
Best,
=========================================================
Center of Excellence for Science and Innovation Studies,
Royal Institute of Technology
Drottning Kristinas v?g 30
100 44 Stockholm, Sweden
e-mail: donghoh at infra.kth.s...
2006 Dec 18
2
AGI Help Please
...6-0baa", "") in new stack
Here is the script:
#!/usr/bin/php -q
<?php
ob_implicit_flush(false);
set_time_limit(6);
$stdin = fopen("php://stdin","r");
$stdout = fopen('php://stdout', 'w');
function read() {
global $stdin, $debug;
$input = str_replace("\n", "", fgets($stdin, 4096));
return $input;
}
function connect_db() {
$database="asteriskcdrdb";
include("./common.php");
include("./dbconnect.php");
}
// parse agi headers into array
while ($env=read()) {
$env = str_replace("\"...
2024 Apr 11
3
Regexp pattern but fixed replacement?
I noticed this issue in stringr::str_replace, but it also affects sub()
in base R.
If the pattern in a call to one of these needs to be a regular
expression, then backslashes in the replacement text are treated specially.
For example,
gsub("a|b", "\\", "abcdef")
gives "def", not "\\\\def&q...
2023 Mar 13
1
str_replace por orden de aparición en una cadena.
Hola,
Tengo una variable string que tiene muchos casos, pero necesito en cada uno
de ellos reemplazar el último "==" por "=".
asi está asi necesito
si p1 == 1 o 2 == 1,3 si p1 == 1 o 2 = 1,3
si p1 == 3 o 4 == 1 si p1 == 3 o 4 = 1
si p1 == 5 == 0,7 si p1 == 5 = 0,7
si p1 == 5 = 0,7 si p1 == 5 = 0,7
si p1 == 6 == 0 si p1 == 6 = 0
si p1 == 7 == no aplica si p1 == 7 = no aplica
2016 Apr 13
4
recreating extensions.conf from live dialplan ?
On 4/13/16 11:57 AM, A J Stiles wrote:
> You could try
> *CLI> dialplan show
Between my older backup and dialplan show, I guess that's my best shot.
Thanks :D
2006 Jul 26
5
Monitor traffic/bandwidth by mountpoint
I saw a request for this feature raised several years ago. Has this been
implemented yet?
If not, how are users monitoring traffic on port 8000, and even better
can you split it up by mountpoint? I want to know how much traffic our
icecast clients are using each month.
Thank you,
Shannon
2013 Feb 15
2
data formatting
...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(Lines2[str_count(Lines2," ")==6],"\\s+","??? ") #reduced 2 spaces
?str_count(Lines2," ")
# [1] 5 5 5...
2023 Mar 13
1
str_replace por orden de aparición en una cadena.
Mientras aparezca alguien que sepa guiarte bien, te muestro desde mi
autodidactez por dónde encararía. Y lo que para mí fue un gran
descubirmiento: El paquete RegExplain,
[image: irudia.png]
(==)([\d, \w]*=[\d, \w]*)$
Eso captura en dos grupos diferentes todo lo que está desde el final hasta
el primer igual, más todo lo que sigue hasta en igual doble, que lo excluye
y lo captura como otro grupo.
2006 Jun 02
1
PHP-AGI help
...n("php://stdin","r");
$stdlog = fopen("/var/log/asterisk/my_agi.log", "w");
// toggle debugging output (more verbose)
$debug = false;
// Do function definitions before we start the main loop
function read() {
global $in, $debug, $stdlog;
$input = str_replace("\n", "", fgets($in, 4096));
if ($debug) fputs($stdlog, "read: $input\n");
return $input;
}
function errlog($line) {
global $err;
echo "VERBOSE \"$line\"\n";
}
function write($line) {
global $debug, $stdlog;
if ($debug) fputs...
2023 Mar 20
0
str_replace por orden de aparición en una cadena.
muchas gracias!!
El mié, 15 mar 2023 a las 6:12, Carlos Ortega (<cof en qualityexcellence.es>)
escribió:
> Hola,
>
> Juntandolo todo se puede hacer así...
>
> #-----------------------------
> cadena <- c(
> 'si p1 == 1 o 2 == 1,3 si p1 == 1 o 2 = 1,3',
> 'si p1 == 3 o 4 == 1 si p1 == 3 o 4 = 1',
> 'si p1 == 5 == 0,7 si p1 == 5 =
2023 Mar 13
1
str_replace por orden de aparición en una cadena.
hola ,muchas gracias!
no conocía esa librería para los regex...respecto a la pregunta de Carlos,
puedo tener más de un == dentro de la cadena, por ejemplo así:
así está
si p1 == 1 o 2 o p2 == 1 == 1,3
así necesito
si p1 == 1 o 2 o p2 == 1 = 1,3
El lun, 13 mar 2023 a las 18:11, Juan Abasolo (<juan.abasolo en ehu.eus>)
escribió:
> Mientras aparezca alguien que sepa guiarte bien, te
2003 Dec 29
1
Agent setup
Dear Group,
I have been successful in setting up the Agents, queues and getting agents
to log in.
Is there a way that I could configure the system so that the agent is called
back. i.e. the agent logs into the system, a call is destined for them and
their phone rings.
If some one has this setup I would be very interested in hearing from them.
Warm Regards and Thanks
---------------
Shad
2023 Mar 14
1
str_replace por orden de aparición en una cadena.
hola! ,me sirve, pero el tema es que necesito crear tres variables nuevas
con el resultado de strsplit....pero me genera una lista y no lo estoy
pudiendo combinar con mutate de dplyr....
El mar, 14 mar 2023 a las 7:46, juan manuel dias (<juamadias en gmail.com>)
escribió:
> Muchas gracias!! Lo pruebo!!!
>
> El mar., 14 de marzo de 2023 04:55, Proyecto R-UCA <r-uca en uca.es>
2023 Mar 14
1
str_replace por orden de aparición en una cadena.
Buenas,
Una opción es partir la cadena usando el == como separador y luego recomponerla.
> a <- "p1 == 1 o 2 o p2 == 1 == 1,3"
> b <- strsplit(a, "==")
> b <- b[[1]]
> b
[1] "p1 " " 1 o 2 o p2 " " 1 " " 1,3"
> paste0(paste0(b[1:(length(b)-1)], collapse = '=='), '=', b[length(b)])
[1] "p1 ==
2023 Mar 14
1
str_replace por orden de aparición en una cadena.
Muchas gracias!! Lo pruebo!!!
El mar., 14 de marzo de 2023 04:55, Proyecto R-UCA <r-uca en uca.es> escribió:
> Buenas,
>
> Una opción es partir la cadena usando el == como separador y luego
> recomponerla.
>
> > a <- "p1 == 1 o 2 o p2 == 1 == 1,3"
> > b <- strsplit(a, "==")
> > b <- b[[1]]
> > b
> [1] "p1 "
2010 Aug 25
0
stringr: version 0.4
...where appropriate) replacement parameters
* fixed() function now tells stringr functions to use fixed matching, rather
than escaping the regular expression. Should improve performance for
large vectors.
* new ignore.case() modifier tells stringr functions to ignore case of
pattern.
* str_replace renamed to str_replace_all and new str_replace function added.
This makes str_replace consistent with all functions.
* new str_sub<- function (analogous to substring<-) for substring replacement
* str_sub now understands negative positions as a position from the end of
the string. -1...
2010 Aug 25
0
stringr: version 0.4
...where appropriate) replacement parameters
* fixed() function now tells stringr functions to use fixed matching, rather
than escaping the regular expression. Should improve performance for
large vectors.
* new ignore.case() modifier tells stringr functions to ignore case of
pattern.
* str_replace renamed to str_replace_all and new str_replace function added.
This makes str_replace consistent with all functions.
* new str_sub<- function (analogous to substring<-) for substring replacement
* str_sub now understands negative positions as a position from the end of
the string. -1...
2005 Oct 12
3
AGI and set_callerid for number and name
Hi,
I've been trying to use the set_callerid function in the AGI. It sets
the CallerIDname properly but I can't figure out how to set the
CallerIDnumber.
Is it at at possible ?
Cheers.
SL