Displaying 20 results from an estimated 1000 matches similar to: "R strange behaviour when working with fifos"
2012 Sep 12
4
Trying to use pipes in R
Hi,
I'm trying to use pipes in R. By now, I could launch the linux command "wc"
(to count words from a text), but
I don't know how to capture the results, say in a vector of chars...
Here is the R code I'm trying:
:> f <- pipe("wc", open="w")
:> writeLines(c("uno dos tres", "cuatro cinco", "seis"), f)
:> close(f)
2020 Sep 13
2
Cambiar datos de un DF
Hola:
Si codificas "col1" como un factor, lo puedes cambiar todo de una vez
renombrando los niveles correspondientes:
> df$col1<-as.factor(df$col1)
> df$col1
[1] uno dos 3 4 cinco 6 siete 8 9 diez
Levels: 3 4 6 8 9 cinco diez dos siete uno
> levels(df$col1)[1:5] <-
2016 Oct 28
2
Encontrar la primera columna no NA
Hola a todos, me ha gustado mucho la solución de Carlos, muy eficiente y
muy ingeniosa al utilizar la funcion col() que o no la conocia o no me
acordaba de ella.
La parte mas "lenta" sigue siendo el apply que en el fondo no es mas que un
ciclo for a traves de las filas, asi que inspirado por el metodo de Carlos
pense que podria ser mas rapido si iteramos a traves de las columnas por lo
2009 Jun 30
2
difference between "names", "colnames" and "dimnames"
Hi all...
I built a matrix binding vectors with rbind, and have something like this:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
CLS 3.877328 4.087636 4.72089 4.038361 3.402942 2.786285 2.671222 3.276419
ORD NaN NaN NaN NaN 5.770780 5.901113 11.888054 7.934823
FAM NaN NaN NaN NaN NaN 3.699455 4.551196 2.885390
GEN
2016 Oct 27
4
Encontrar la primera columna no NA
Por último, utilizando la indexación lineal de matriz que propusó luisfo en su momento:
> t <- Sys.time()
> M=as.matrix(dat)
> index <- which(!is.na(M)) - 1
> meses<-colnames(M)
> M2<- data.table(columna=index %/% nrow(M) +1L, jugador=index %% nrow(M) +1L , valor=M[index+1L])
> setkey(M2,jugador,columna)
>
2016 Oct 27
2
Encontrar la primera columna no NA
Otra solución algo más rapida:
> t <- Sys.time()
> dat[,jugador:=1:.N]
> dat2=melt(dat,id.vars="jugador")
> setkey(dat2,jugador)
> dat2[,index:=min(which(!is.na(value))),by=jugador]
> dat2[,.(First_month=variable[index[1]],Value_First_month=value[index[1]]),by=jugador]
jugador First_month Value_First_month
1: 1 Uno 0.93520715
2:
2016 Oct 27
3
Encontrar la primera columna no NA
Imaginemos que tenemos una matriz con datos temporales por sujetos.
Pongamos que numero de veces que ha jugado una carta en un juego online. Y
que quiero saber cuantas veces jugo la carta el primer mes que estuvo en el
juego.
Pero claro mi matriz guarda los datos temporalmente de tal manera que:
# data.table( Enero = c( 1, 4, NA , NA , NA) , Febrero = c( 2, 6, 1, NA, NA
) , Marzo = c( 8,6,7,3,
2020 Sep 10
2
Cálculo de la "d" de Cohen para mas de dos grupos
¡Buenas tardes! (en el continente americano):
Tengo los resultados de cuatro muestreos de campo (cuatro
cruceros oceanográficos) y quiero calcular la "d"de Cohen para todas las
combinaciones posibles de los cuatro cruceros. Los paquetes de R que he
encontrado solo permiten hacer el cálculo para un par de grupos.
¿Hay algo que pueda hacer para hacer el cálculo de las seis combinaciones
2020 Aug 24
3
(sin asunto)
Creo que el problema se podría simplificar y aún obtener un resultado
aceptable si simplemente haces un ajuste lineal en un entorno del punto.
Como ya tienes los valores de los puntos de cada curva como dices
Carlos, creo que con esa información podrías identificar un entorno
adecuado en el cual ajustar linealmente.
Cuéntanos como te va,
Saludos !!
Eric.
On 24-08-20 12:52, Carlos Ortega
2007 Oct 15
1
Answering Machine Detection
I am having a bit of a problem getting AMD to work on a new server. On
my regular office server it works like a charm. I am running Asterisk
1.4.13, Zaptel 1.4.5.1 on both machines. Both servers run CentOS 5 and
I am using a SIP trunk to send out calls (the same one on both servers).
Here is the output of a call on my office server:
-- Attempting call on Local/0445540881644 at CC2 for
2007 Dec 02
2
Answering Machine Detection
If i use AMD() or the code below, now the problem is the fax machine/modem detection and answer machine detection get detected as the same. If i need to seperate the two how do i do that? For example, if i use AMD() to detect an answer machine by saying any greeting exceeding 2.5 seconds is a machine, how do i distinguish between a fax/modem and a long greeting?
---- dave cantera
2008 Feb 26
1
AMD on a SIP trunk...
We have an Asterisk server with a small outgoing call center. We use
AMD and it usually works very well on Zap channels (E1 PRI). We added a
couple of SIP trunks to reduce long distance costs but now AMD gets
stuck when the call goes out through the SIP channels. Here is an
example call using a SIP line:
-- Executing [016566275538 at CC2:1]
Set("Local/016566275538 at CC2-dad7,2",
2003 May 08
1
A problem in a glm model
Hallo all,
I have the following glm model:
f1 <- as.formula(paste("factor(y.fondi)~",
"flgsess + segmeta2 + udm + zona.geo + ultimo.prod.",
"+flg.a2 + flg.d.na2 + flg.v2 + flg.cc2",
" +(flg.a1 + flg.d.na1 + flg.v1 + flg.cc1)^2",
" + flg.a2:flg.d.na2 + flg.a2:flg.v2 +
2004 Nov 29
1
Calling from PSTN let exension 601 ring twice, hang up and starts over again to ring twice, ...
Calling from PSTN let extension 601 ring twice, hang up and starts over
again to ring twice, ...
If I pickup I do not hear on extension 601, and on the PSTN it is still
signaling to ring.
Can anybody enlighten me, please?
extension.conf
[incoming_88097074]
exten => s,1,Wait(1) ;wait to get caller ID in.
exten => s,2,Dial(SIP/102,20)
exten => s,3,Voicemail(u102)
exten =>
2008 Sep 19
0
panel data analysis possible with mle2 (bbmle)?
Dear R community,
I want to estimate coefficients in a (non-linear) system of equations using
'mle2' from the "bbmle" package. Right now the whole data is read in as just
one long time series, when it's actually 9 cross sections with 30 observations
each. I would like to be able to test and correct for autocorrelation but
haven't found a way to do this in this package.
2008 Sep 25
2
Two overlaid density plots - Does order matter?
In the following code, the only difference between the two plots is the
order the variables are plotted. In this case, the plot of "cdata.den" in
plot #1 is different from its plot in #2. Specifically, "cdata.den" spans
the x-axis from -5 to 30 in plot #1 and from 0 to 20 in plot #2. Does
anyone understand why these two plots do not yield the same result?
#Make density
2007 Sep 30
1
[Patch] reenable fifos if we get an error while fifos disabled
Hello,
while playing around with multiple fifo contexts I got fifo hangs when opening glxgears nr.3.
The reason is that in drm/linux_core/nouveau_fifo.c l.342 engine->graph.create_context() returns
-ENOMEM (I dont know why but I think this problems also appears with other errors).
But the real problem is that then nouveau_fifo alloc() returns without reenabling fifo execution,
so all fifos
2004 May 01
1
[Bug 856] scp hangs on FIFOs rather than erroring
http://bugzilla.mindrot.org/show_bug.cgi?id=856
Summary: scp hangs on FIFOs rather than erroring
Product: Portable OpenSSH
Version: 3.8p1
Platform: Other
URL: http://bugs.debian.org/246774
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: scp
AssignedTo:
2003 Nov 30
0
FreeBSD mknod refuses to create pipes and fifos
>Submitter-Id: current-users
>Originator: Joao Carlos Mendes Luis
>Organization:
>Confidential: no
>Synopsis: FreeBSD mknod refuses to create pipes and fifos
>Severity: non-critical
>Priority: low
>Category: kern
>Class: change-request
>Release: FreeBSD 4.9-RC i386
>Environment:
System: FreeBSD zeus.faperj.br 4.9-RC FreeBSD 4.9-RC #3: Sat Oct 25 17:54:52 BRST
2011 Feb 24
6
[Bug 1869] New: ssh-add can no longer read from FIFOs as of 5.7p1
https://bugzilla.mindrot.org/show_bug.cgi?id=1869
Summary: ssh-add can no longer read from FIFOs as of 5.7p1
Product: Portable OpenSSH
Version: 5.8p1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: ssh-add
AssignedTo: unassigned-bugs at mindrot.org