[R] splitting a vector of strings

2016-07-21 Thread Eric Elguero
meone have a better solution? sorry if that topic was discussed recently. There is too much traffic on the r-help list, I cannot catch up. -- Eric Elguero MIVEGEC. - UMR (CNRS/IRD/UM) 5290 Maladies Infectieuses et Vecteurs, Génétique, Evolution et Contrôle Institut de Recherche pou

Re: [R] problem with function "polygon"

2014-11-07 Thread Eric Elguero
On 11/07/2014 04:35 PM, Duncan Murdoch wrote: You are not using the polygon() function from the graphics package, you're using one coming from somewhere else (maybe an old version of R, or some package). The polygon() function in the graphics package doesn't call .Internal(polygon(..., it calls

[R] problem with function "polygon"

2014-11-07 Thread Eric Elguero
Hi all, I'm trying to use the polygon function from the graphics package, and get this error message : > polygon(x=c(1,2,3,1),y=c(1,4,5,1)) Error in .Internal(polygon(xy$x, xy$y, col, border, lty, ...)) : there is no .Internal function 'polygon' That annoys me because polygon is actually call

[R] transmission of parameters to the glmmadmb function

2014-01-09 Thread Eric Elguero
Hi everybody, I wrote a function where several variables are created, and the used in a generalized mixed model, from the glmmADMB package. here is part of the function: print(length(spy)) uu<-summary(glmmadmb(spy~sex+poswing+spx+(1|host),data=ni, family="nbinom",zeroInflation=Tru

[R] censored counts and glmer/glmmADMB

2013-12-12 Thread Eric Elguero
glmmADMB?). That seems not to exist. my question is : how could I add a custom-built family of distributions that I could call in glmer/glmmADMM ? if it's not possible, I am considering imputing fake values to replace the censored ones, but I am unsure whether this is bad or very bad...

[R] call to system returns warning : status 2 (Ubuntu)

2012-03-18 Thread Eric Elguero
he bash prompt, everything seems fine (no complaint). in either cases, the output is the same and looks correct. So, may I just ignore these warnings or is there something I should fix? thank you in advance, Eric Elguero MIVEGEC IRD -CNRS - UM1 Montpellier - France _

[R] problem with missing package

2011-06-16 Thread Eric Elguero
t;load("xxx") but that doesn't help. Is there a method to extract some information from .RData without loading it? Eric Elguero __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] modifynig some elements of a vector

2011-02-10 Thread Eric Elguero
ted values in u I found this solution: tu <- table(u) indices <- as.numeric(names(tu)) x[indices] <- x[indices]+tu but it looks ugly to me and I would prefer to avoid calling the function 'table' since this is to be done millions of times as part of a simulation program.

[R] using gedit

2010-10-22 Thread Eric Elguero
s if I close the tab or the editor altogether. Is there a solution to this problem? thanks in advance. Eric Elguero __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.or

Re: [R] randomness in stepclass (klaR) or lda (MASS) ?

2010-04-29 Thread Eric Elguero
eave-one-out" was the default. I looked at the reference file and I am not sure how to get it. Is that by setting fold=1 ? > > If the results are that unstable: Do you really have a sufficient number > of observations for your classification problem? you're probably right. e.e

[R] randomness in stepclass (klaR) or lda (MASS) ?

2010-04-29 Thread Eric Elguero
e sample. I advised her to run the function several times and see if a consensus emerges, but that doesn't seem to be the case, and besides, I would like to know what really is going on. thanks Eric Elguero Laboratory Genetics and Evolution of Infectious Diseases, Team: Genetics and Adaptat

[R] sigma in glmer (lme4)

2009-05-06 Thread Eric Elguero
dear R-users, I am trying to understand what is the sigma parameter returner by glmer I thought it was (an estimate of) the sigma parameter defined by Mc Cullagh & Nelder (e.g. p 126 of 2nd edition) but I ran some simulations and it seems that this is something else. I simulated data correspondi

Re: [R] refit with binomial model (lme4)

2009-04-28 Thread Eric Elguero
se the expanded form (i.e. a vector of 0/1 values) > of the responses instead of the matrix form? > yes I could but I found that I could use the probability/weights form, at least in my case where I am simulating new binomial data with the observed number of trials. Eric Elguero > On Mon,

[R] refit with binomial model (lme4)

2009-04-27 Thread Eric Elguero
Dear R users, I'm trying to use function 'refit' from lme4 and I get this error that I can't understand: > refit(dolo4.model4,cbind(uu,50-uu)) Error in function (classes, fdef, mtable) : unable to find an inherited method for function "refit", for signature "mer", "matrix" if I try: > refit

[R] strptime

2008-06-18 Thread Eric Elguero
Hi, what's wrong with that? strptime("06:00:00 03.01.2008",format="%H:%M%:%S %d.%m.%Y",tz="GMT") [1] NA the command seems to comply with the rules in the help file but returns NA (R 2.6.1 Windows XT) Eric Elguero

Re: [R] precision in seq

2008-02-05 Thread Eric Elguero
mething like x%in%seq(0,1,0.05) Now I understand that I should not use this construction unless x is of type integer. Would you agree? Eric Elguero __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

[R] precision in seq

2008-02-04 Thread Eric Elguero
.9 and 1 are correct (within some tolerance or strictly exact?) and 0.95 is not. this one works: > ((0:20)/20)[20]==0.95 [1] TRUE Eric Elguero __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

[R] Tabulations in command-line under linux

2008-01-11 Thread Eric Elguero
Hi everybody, I'm trying to use R (2.4.1) undr Linux (debian) and a thing bothers me: sometimes I paste lines from a text editor into the R command line and tabulations are catched by the completing-names function of the csh. How could this behaviour be inhibited? thanks in advance Eric El

Re: [R] Contour plot (level curves)

2007-10-05 Thread Eric Elguero
> I have a sample of n values from a bivariate distribution (from a MCMC > procedure). How could I draw a contour plot of "the joint density" based on > that sample ? here is a fast 2D density estimator. Not very sophisticated, but works. The function assumes that data are in the form of a matrix