Dear Rosa,
you can use grep for pattern matching along the lines of:
x <- c("00071101", "0007", "00071112","123456789123")
grep("^[0-9]{2}07[0-9]{6}(01|11)", x)
Here I assume that your real IDs consist of integers only. The pattern
matches two integers followed by 07 followed
Dear All,
I am trying to simulate using a statistical model created in the lava()
package. My model gave the error message "Error in rep(0, ncol(fx)) : invalid
'times' argument". So, I used the example in the documentation for the lava()
package - v1.4.4, on page 79; this is copied below with
Hi
I do not know anything about lava, however this
m <- lvm(y~x+z)
regression(m) <- x~z
distribution(m,~y+z) <- binomial.lvm("logit")
d <- sim(m,1e3)
head(d)
y x z
1 1 1.0033540 1
2 0 0.3834120 0
3 1 -0.3737790 1
4 1 -1.2927288 0
5 0 -0.4242461 1
6 0 -1.8349548 0
>
gives me some
Dear Elisabetta,
I have no direct answer to your question, but a suggestion: Use the
'coxme' function (in the package with the same name). In the help page
for 'frailty' (survival) you will find: "The coxme package has
superseded this method. It is faster, more stable, and more flexible."
Dear all,
I have searched all over and didn´t found an answer :( Sorry, I'm new.
I need urgently to "not analyse"the weight the ID's that have 07 in the
position 3 and 4 respectively, 01 or 11 in positions 11 and 12 of ID
variable. .
I used the following code:
Hi,
does anybody know what header file includes the bspline functions used in R?
Regards,
Filippo
Forwarded Message
Subject:Splines
Date: Sun, 04 Sep 2016 09:12:37 +0100
From: Filippo Monari
To: R-help@r-project.org
Hi,
I would like to
Dear users,
I am fitting a conditional gap time frailty cox model weighting
observations by means of inverse probability time dependent weigths.
Attached find the self-explaining dataset.
I have used the following sintax:
Hello,
Try placing the & immediately after the substr() conditions, like this:
base <- baseR[substr(baseR[['ID']],3,4)!='03' &
substr(baseR[['ID']],11,12)!='01' &
substr(baseR[['ID']],11,12)!='11',]
Maybe I'm wrong but R might have decided that
On Mon, Sep 5, 2016 at 5:33 PM, Bert Gunter wrote:
>
> I'm sharing this with r-help, as your detailed response might help
> others help you.
Oh, my bad (thought I had replied to all).
I wanted to add anyways the intended result seems to be possible. If
pasting the code
Jun:
You need to provide a clear specification via regular expressions of
the patterns you wish to match -- at least for me to decipher it.
Others may be smarter than I, though...
Jeff: Thanks. I have now convinced myself that it can be done (a
"proof" of sorts): If pat1, pat2,..., patn are m
Jeff:
It is not obvious to me that the ability to *match* an arbitrary
pattern (including one of several different ones via "|" , per the
link you included) implies that sub() and friends can extract it, e.g.
via the /N construct or otherwise. I would appreciate it if you or
someone else could
Yes, sorry I did not look closer... regex can match any finite language, so
there are no data sets you can feed to R that cannot be matched. [1] You may
find it hard to see the pattern, or you may want to build the pattern
programmatically to alleviate tedium for yourself, but regexes are not
I am not the one who proved this... I can only respond to your suggested
counterexamples.
--
Sent from my phone. Please excuse my brevity.
On September 5, 2016 9:01:12 AM PDT, Bert Gunter wrote:
>Jeff:
>
>It is not obvious to me that the ability to *match* an arbitrary
Thanks for the reply, Bert.
Your solution solves the example. I actually have a more general situation
where I have this dot concatenated string from multiple variables. The
problem is those variables may have values with dots in there. The number
of dots are not consistent for all values of a
Try changing the separator to ;
# write.table() instead of write.csv()
> write.table(Dat, "Dat.csv", quote = FALSE, sep=";", row.names = FALSE)
> readLines("Dat.csv")
[1] "col 1;col 2;col 3;col 4;col 5;col 6"
[2] "133261;aaa1;10.59;10.59;10.59;04-Jul-16"
[3]
Dear Michael,
thank you for your reply! I managed to solve the problem in the
meantime, there was an issue in the effect size conversion (correlations
to Fisher's z) that lead to zero values for some effect size variances.
Regards,
Kristina
-
Kristina
This is not the kind of thing people know off the top of their heads, and even
if they do it is an ideal application of text search tools. Download the source
and start looking. Don't neglect the licencing terms... your use of that code
implies responsibilities on your part.
--
Sent from my
Thank you very much Petr! An external check like you did really helps.
After shutting down, I've started new session and project in a different
directory and it's working.
I will know next time that with R a full "turn it off and turn it on again" can
make a difference even when I can't see
-- Forwarded message --
From: Abdoulaye SARR
Date: Mon, Jan 1, 2001 at 4:02 AM
Subject: Re: [R] problem writing .bil files in netcdf
To: Michael Sumner
Cc: r-help@r-project.org
Hi Michael,
I had a problem with my mac hopefully solve
Hi Rosa,
Your data never seem to get through. Nevertheless, here is a suggestion:
rodat<-data.frame(id=1:20,age=sample(c("10-20","21-30","31-40"),20,TRUE),
weight=c(sample(40:70,18),110,120))
robp<-boxplot(weight~age,rodat)
rodat$id[which(rodat$weight %in% robp$out)]
Jim
On Mon, Sep 5, 2016
I'm sharing this with r-help, as your detailed response might help
others help you.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sun, Sep 4, 2016 at
Dear all,
I have searched all over and didn´t found an answer :(
I need urgently to "extract" de identification of the weight outliers of
the participants of a study.
So, I have a data base with several variables:
id
weight
are 2 off them.
So, I've done a boxplot and found the weight have
Hi
Im running X13 with the seasonal package. However, in some series i get
this error after specifying the x11 options:
o_1=ts(o1,frequency=12,start=c(2010,2))
so_1=seas(o_1, x11="",transform.function ="log",arima.model="([3] 1 1)(1 1
0)", x11.seasonalma="S3x5",x11.trendma=13)
Error in x[[2]] :
There are several issues,
1. I think
ReadName = '133261'
read.csv.sql("Dat.csv", sql = "select * from file where 'col 1' = ReadName")
should be replaced by something like this
ReadName = '133261'
sql_cmd <- sprintf("select * from file where col_1='%s'", ReadName)
sql_cmd
hello,
I've a number of timeseries into a database and want to display these
timeseries into graph.
Now the code below works well, but as the user can select which
timeseries should be shown (up to 20 timeseries) the code below should
be dynamic and can be quiet large and complex.
Is
I think I have found a working solution. Rather ugly, but working and will
keep looking for better alternatives, though.
The procedure involves:
- parsing one line at a time
- if incomplete, parse as many lines as necessary to form an expression
- determine all expressions in the original input
Hi,
I am working with this code:
forecast_nal<-data.frame()
out<-vector()
x<-foreach(i=1:nrow(comb)) %do%
{
s<-comb[i,'prod_id']
#Familia+Sumbarca+prod_id
#Serie
bcomb1<-b
bcomb1<-subset(bcomb1,bcomb1$prod_id == s & bcomb1$year <= 2015)
bcomb1<-arrange(bcomb1,year,week)
a<-bcomb1[1:1,'week']
Erika,
You have failed to supply reproducible code. I do not all that is missing, but
a glance shows that you did not include the code to load the foreach package or
a definition of the objects named comb and b.
It is very likely you will receive assistance if you can follow the posting
guide
Hi
First I thought that it could be due to variables which can be defined in your
workspace however I had also x and y defined and did not experience error. I
tried with the code with m, z, logit and lvm silly defined as variables but I
did not experience any error too.
So I have no clue how
Hola,
El mensaje de error "model must be fitted with formula interface" te está
indicando que el objeto "*ssp.rda.hel*" no lo construiste de acuerdo a una
fórmula.
En la ayuda de la función (entiendo que es el paquete "vegan") aparece un
ejemplo en el que el modelo se ha construido con una
Estimados,
Buenas Tardes,
Estoy teniendo problema para testar la significancia de los ejes del RDA. NO
se cual seria el error.
Alguien me podría ayudar? Desde ya muchas gracias.
Saludos, Luis
# Tests of all canonical axes
anova.cca(ssp.rda.hel, by="axis", step=1000)#Para saber la
Estimados:
Tengo problemas con mi programa R. Cada vez que dejo stand-by mi compu por unos
minutos, R se queda pegado, e imposibilitado de trabajar, lo que me obliga a
cerrarlo y volver a abrirlo cada vez que sucede.
De: Carlos Ortega [mailto:c...@qualityexcellence.es]
Enviado el: miércoles, 31
Hola,
Más preguntas:
- Versión de RStudio
- Versión de R.
- Cuando te ocurre esto con un plot, ¿ tu script ha generado otros
muchos plots previamente?. A veces RStudio no gestiona bien numerosos plots
generados de forma consecutiva.
- Cuando dices que el plot se deforma, es que
Estimados
Hay un artículo con un ejemplo en
https://blog.exploratory.io/summarizing-data-quickly-like-pivoting-a9ed9c81d495#.asld1e68f
Javier Rubén Marcuzzi
De: Carlos Ortega
[[alternative HTML version deleted]]
___
R-help-es mailing list
Estimado Javier Valdes Cantallopts
Le propongo una prueba, correr todo pero presione control + alt + delete, para
ver los recursos que va utilizando, puede ser que el CPU o memoria tengan un
problema, si los recursos no llegan al 100% (un rato no hay problema)
efectivamente el problema no es
Hola,
Das demasiada poca información para poder ayudarte de alguna manera..
Algunas preguntas a las que si tienes respuesta podrías haberlas aportado:
- Cuando te ocurre esto, ¿tienes R ejecutándose con algún script?.
- Si el problema es recurrente, has llegado a abrir algún gestor de
Hola Carlos:
-Mira, mi máquina es nueva, con 16 giga de memoria Ram, así que no creo que sea
problema de recursos
-En general me pasa esto cuando despliego un Plot. (Después que me paro y
vuelvo a mi escritorio, pasado 15 min) el plot se deforma en la pantalla y
después al eliminarlo se queda
37 matches
Mail list logo