Re: [R] To build a new Df from 2 Df

2014-10-15 Thread Arnaud Michel
Thank you David Now, the problem is to list all the combinations which verify the condition III (ie every Rapporteur has to have more or less the same number of demandeur) Have you any idea ? Michel Le 14/10/2014 13:18, david.kaeth...@dlr.de a écrit : Hello, here's a draft of a solution.

[R] Error using betamix function

2014-10-15 Thread Camille Dezecache
Hi all, I'm trying to use the betamix function (betareg package) to create a beta mixture model but get this error that I don't understand: Error in lm.wfit(x, linkfun(y), weights, offset = offset[[1L]]) : NA/NaN/Inf in 'y' Error in lm.wfit(x, linkfun(y), weights, offset = offset[[1L]]) :

[R] Sum of two consecutive number in dataset.

2014-10-15 Thread Frederic Ntirenganya
Dear All, i am solving the following problem in my work. The first day from April 01 that gets more than 20 mm on a single day, or totalled over 2 consecutive days. i.e April 01 = 92th day of the year. The column of interest is Rain. head(Samaru56) Year Day Rain 1 1928 10 2 1928 2

[R] Parameter estimation of loglogistic, lognormal and 2 parameter exponential distributions

2014-10-15 Thread Jomy Jose
How to estimate paremeters the of loglogistic,lognormal and 2 parameter exponential distributions in R using fitdistr function. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] package installation failure virtualisation environment

2014-10-15 Thread rl
On 2014-10-14 15:40, Sven E. Templer wrote: Prevent graphic menues with: options(menu.graphics = FALSE) Same response after a pause: 'Killed' or and define repositories: options(repos = c(CRAN = http://cran.r-project.org;)) Same response after a pause: 'Killed'

[R] lag operator on a zoo object - code sharing

2014-10-15 Thread jpm miao
Hi, I could not find a nice lag operator on zoo object. Perhaps there is, but I just couldn't find it. Basically I want the operator to return the lagged zoo object (with one or more variables ) with the original date. For example, if I write lag(x, -3), then I got the lagged series, but the

Re: [R] package installation failure virtualisation environment

2014-10-15 Thread Sven E. Templer
did you check the connection in R via for example: head(readLines(http://cran.r-project.org/web/licenses/GPL-3;)) which should yield: [1] GNU GENERAL PUBLIC LICENSE [2]Version 3, 29 June 2007 [3] [4] Copyright (C) 2007 Free Software Foundation, Inc.

Re: [R] lag operator on a zoo object - code sharing

2014-10-15 Thread Achim Zeileis
On Wed, 15 Oct 2014, jpm miao wrote: Hi, I could not find a nice lag operator on zoo object. Perhaps there is, but I just couldn't find it. See ?lag.zoo. Basically I want the operator to return the lagged zoo object (with one or more variables ) with the original date. For example, if I

Re: [R] lag operator on a zoo object - code sharing

2014-10-15 Thread Pascal Oettli
Hi, You probably missed the na.pad argument of the lag function (for zoo objects). ?zoo:::lag.zoo Regards, Pascal On Wed, Oct 15, 2014 at 6:00 PM, jpm miao miao...@gmail.com wrote: Hi, I could not find a nice lag operator on zoo object. Perhaps there is, but I just couldn't find it.

Re: [R] Sum of two consecutive number in dataset.

2014-10-15 Thread PIKAL Petr
Hi twodays - rowSums(embed(Samaru56$Rain,2)) gives you sum of rain in 2 cosecutive days sel - which(twodays20) gives you vector of row numbers in which above condition results in TRUE value Samaru56[sel,] selects these rows Regards Petr -Original Message- From:

Re: [R] how to ajust y-axis values in plot() ?

2014-10-15 Thread PIKAL Petr
Hi is plot(11:20, ylim=c(0,40)) abline(h=40) what you want? Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of PO SU Sent: Tuesday, October 14, 2014 11:33 AM To: R. Help Subject: [R] how to ajust y-axis

[R] gsub regexp question

2014-10-15 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
I just found a curious behaviour of regexp and I'd like to share with y'all. gsub(^([[:alnum:]\\[\\]]*).*, \\1, array[n] - 10, perl=T) # works as expected (array[n]) gsub(^([[:alnum:]\\[\\]]*).*, \\1, array[n] - 10, perl=F) # doesn't work (a) I didn't find anything in the documentation explain

Re: [R] Sum of two consecutive number in dataset.

2014-10-15 Thread Franklin Mairura
Hi, this sound like u are calculating cummulative rainfall, this can also be done in excel, then import the matrix to R, hope can help, Franklin, Maseno, Kenya. On Wednesday, October 15, 2014 1:02 PM, PIKAL Petr petr.pi...@precheza.cz wrote: Hi twodays - rowSums(embed(Samaru56$Rain,2))

[R] vcov function and cross terms

2014-10-15 Thread Daniela Droguett
Hi, I would like to apply the vcov function from the survey package for the variables api00 and api99 grouped by the stype variable which can assume H, M and E categories. ​From the code in the survey package manual:​ ​data(api) dclus1-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)

Re: [R] gsub regexp question

2014-10-15 Thread Jeff Newmiller
I believe the backslash is not considered an escape character by the extended RE library used by R (perl=FALSE), so it is being treated as a literal. This means that the last ] is outside the character class and is the atom that the * applies to. gsub(^([[:alnum:]\\[\\]]*).*, \\1, a]]]rray[n]

Re: [R] vcov function and cross terms

2014-10-15 Thread Anthony Damico
it might be slightly different, but i think the result is very close to a tsl result (which hasn't been implemented).. could you use this? mns-svyby(~api00+api99, ~stype, rclus1, svytotal,covmat=TRUE) vcov(mns) On Wed, Oct 15, 2014 at 9:27 AM, Daniela Droguett

Re: [R] Ternary Plots Do Not Display Ellipses in PDF

2014-10-15 Thread David L Carlson
I haven't looked at the source so I don't know exactly what is going on, but I think I have a work around. While running your example I noticed that ellipse() does not just add the ellipse to the plot produced by plot(), it replots the figure. However, just running ellipse() without plot()

Re: [R] Sum of two consecutive number in dataset.

2014-10-15 Thread Tom Wright
A couple of observations: 1) I'm not sure what the variable i is doing, looks like you are trying to loop through years but perhaps you left that bit of code out for clarity. 2) On the first loop of i you are assigning the values of Samaru56[sow_day,] to all values in Samaru56. For future loops

Re: [R] Ternary Plots Do Not Display Ellipses in PDF

2014-10-15 Thread Rich Shepard
On Wed, 15 Oct 2014, David L Carlson wrote: I haven't looked at the source so I don't know exactly what is going on, but I think I have a work around. While running your example I noticed that ellipse() does not just add the ellipse to the plot produced by plot(), it replots the figure.

Re: [R] Sum of two consecutive number in dataset.

2014-10-15 Thread William Dunlap
Break down your problem into parts: # compute two-day totals. I use filter here, but there are many ways twoDayTotal - function (x, init = 0) { # init lets you supply rainfall from day previous to first in x filter(c(init, x), c(1, 1))[-length(x)] } # compute the first time a logical

Re: [R] Sum of two consecutive number in dataset.

2014-10-15 Thread Jeff Newmiller
twodays - c(filter(x,c(1,1),sides=1)) might be more efficient with memory than the embed approach, which might be important if more than two days were of interest. --- Jeff NewmillerThe .

Re: [R] package installation failure virtualisation environment

2014-10-15 Thread William Dunlap
Have you looked at recent entries in the system log files in /var/log, especially /var/log/kern.log? Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Oct 15, 2014 at 1:51 AM, r...@openmailbox.org wrote: On 2014-10-14 15:40, Sven E. Templer wrote: Prevent graphic menues with:

Re: [R] Ternary Plots Do Not Display Ellipses in PDF

2014-10-15 Thread Rich Shepard
On Wed, 15 Oct 2014, David L Carlson wrote: I haven't looked at the source so I don't know exactly what is going on, but I think I have a work around: plot(winters.acomp, main=Winters Creek, cex=0.5) pdf(winters-pdf.pdf) ellipses(mean=mn, var=vr, r=r, steps=72, thinRatio=NULL, aspanel=FALSE,

[R] Passing object value in command line

2014-10-15 Thread Abhinaba Roy
Hi R-helpers, I have a R script (mainCall.R) which takes the value of an object *'Mon'* as '31-may-2014' or '31-aug-2014' . How can I run the R script by passing the value of Mon from the command prompt? Any help will be appreciated Regards, Abhinaba [[alternative HTML version

[R] Proportion data GAM

2014-10-15 Thread Rodrigo Tardin
Hi all, I am not sure if this is the right place for this question or if there is one more specific. Anyway, I hope somebody can help me. I am trying to run a GAM with beta distribution from mgcv package. My dependent variable is a proportion continuously ranging from 0 to 1 (whales density) and

[R] Retrieving lists of colnames

2014-10-15 Thread adam.n.jenkin...@gmail.com
Hi what I have is a large excel doc (100 columns, 350 row) with data values from 0-1. The end goal is for each row to have a list of colnames of which columns contain values 0. I've been tinkering around with apply mostly and some other functions, any help offered would be greatly

[R] HELP

2014-10-15 Thread JAVAD LESSAN
Hello There! I have an issue reading a large text file and parsing it. I would be grateful if you let me you can help me about? Thanks. Javad [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Passing object value in command line

2014-10-15 Thread Jeff Newmiller
There is this great document called the R Reference that comes with the software in which you can search for command and find the answer. There is also a useful function called apropos that can search the help files from the R prompt. Try apropos(command). There is also a manual for this

Re: [R] Proportion data GAM

2014-10-15 Thread Simon Wood
Can you give the result of typing sessionInfo() in the session where this happens, please? On 15/10/14 16:48, Rodrigo Tardin wrote: Hi all, I am not sure if this is the right place for this question or if there is one more specific. Anyway, I hope somebody can help me. I am trying to run a

Re: [R] Proportion data GAM

2014-10-15 Thread Simon Wood
Rodrigo, OK, it looks as if your mgcv help files/manual are somehow out of sync with the package version you have loaded. 'betar' is only available from mgcv 1.8. If you update to the current mgcv from CRAN then this problem should be solved. best, Simon ps. beta regression is only

Re: [R] Proportion data GAM

2014-10-15 Thread Rodrigo Tardin
Hi Simon, The result of sessionInfo() is: R version 3.1.0 (2014-04-10) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252 [3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C [5] LC_TIME=Portuguese_Brazil.1252 attached base

Re: [R] Proportion data GAM

2014-10-15 Thread Rodrigo Tardin
Thanks Simon! That worked! I did not constrain my k as you suggested, but when I saw my results, my degrees of freedom are not larger than 1, the REML is negative and all covariates are not significant (what it does not make sense). Is there something wrong? Here's the results of summary (a2)

[R] how to loop through dataframe objects in environment

2014-10-15 Thread Stephen HK Wong
Dear All, I have many 50 objects they are all dataframes. Each dataframe has many rows and four column. I simply want to do an addition of 3rd and 4th column and save the result into 5th column. Since there are many dataframes, I don't want to do it one by one, is there a way to loop through

Re: [R] Passing object value in command line

2014-10-15 Thread MacQueen, Don
Don¹t know exactly what you mean by ³passing the value of Mon from the command prompt², but it could be At the R prompt: Mon - ¹31-may-2014¹ source(mainCall.R) If, on the other hand, you mean shell prompt, then within R see ?commandArgs On 10/15/14, 11:21 AM, Abhinaba Roy

[R-es] Test K-S con distribuciones LogNormales

2014-10-15 Thread Víctor Nalda Castellet
Hola a todos, ¿que tal? Os escribo porque llevo varios días con la siguiente duda: quiero realizar el test de K-S para dos distribuciones lognormales, una de ellas con datos agrupados (bucketizados). library(stats) # Definimos las variables n - 100 # tamaño de la muestra mean - 0 # media de

Re: [R-es] [Grupo Usuarios de R de Madrid]: Siguiente reunión 15-octubre....

2014-10-15 Thread Carlos Ortega
Hola, Un a breve nota para recordar que hoy tendremos la reunión del Grupo de Usuarios de R de Madrid. - La agenda es la misma que anunciamos. - La reunión será en la Facultad de Educación (UNED) en la sala Fernández Huertas, planta 1ª. Los detalles de la convocatoria los podéis

Re: [R-es] Test K-S con distribuciones LogNormales

2014-10-15 Thread Víctor Nalda Castellet
Hola Ruben, Sí precisamente es lo que comentas, en matemáticas no se suele llamar bucketización (este término se emplea más en informática) sino datos agrupados. Pero la idea es la que tu mismo dices. Respecto a las gráficas que has puesto, me han aclarado mucho sobre el tema, gracias. Si

Re: [R-es] Heatmap de paro (o de otra cosa) en España

2014-10-15 Thread Francisco J. Viciana
Los mapas de Paro a partir de la EPA, pueden llegar como mucho a nivel provincial para la que la muestra da datos representativos. Una alternativa son los mapas de mortalidad, para los que hay datos con mucho mayor nivel de detalle geográfico, véase por ejemplo esta reciente publicación por

Re: [R-es] Test K-S con distribuciones LogNormales

2014-10-15 Thread Víctor Nalda Castellet
Hola Ruben, Gracias por los paquetes que me comentas para realizar los contrastes de bondad de ajuste. Voy a seguir variando parámetros para ver los resultados que obtengo. Un saludo y muchas gracias. El 15 de octubre de 2014, 14:54, rubenfcasal rubenfca...@gmail.com escribió: Hola de

Re: [R-es] Heatmap de paro (o de otra cosa) en España

2014-10-15 Thread Carlos Ortega
Hola Pedro, Acabo de recordar que hace poco José Luis Cañadas (participa en esta lista) publicó un enlace suyo a un análisis del paro en Analucía hecho con R y publicado en RPubs. Sobre mapas asocia diferentes nivels de paro con diferentes matices de color (rojo)... Este es el enlace:

[R-es] Instalacion paquete en R

2014-10-15 Thread Juan Carlos Reale
Buenos días, les escribo desde Venezuela. Estoy realizando un curso sobre ciencia de datos (Coursera), en el cual usamos R, ya he pasado un modulo de estudio sobre el R, pero, actualmente necesitamos usar los paquetes xlsx y MySql, con la intención de leer archivos en sus respectivos formatos.

Re: [R-es] Instalacion paquete en R

2014-10-15 Thread Marcuzzi, Javier Rubén
Estimado Juan Carlos Reale En ubuntu hay dos JDK, yo use el de oracle, no el de ubuntu, y pude utilizar rmysql. Lo más sencillo es que busque un repositorio donde instala JDK de oracle (no recuerdo donde pero estaba) porque es más facil que usar la documentación del instalador desde oracle,

Re: [R-es] Resumen de R-help-es, Vol 68, Envío 22

2014-10-15 Thread Jose Arturo Farfan
eo que las oreciones y los medicamentos si me estan ayudando. Hoy tengo cita con el psiquiatra El 15 de octubre de 2014, 9:33, r-help-es-requ...@r-project.org escribió: Envíe los mensajes para la lista R-help-es a r-help-es@r-project.org Para subscribirse o anular su subscripción a

[R-es] RCharts+Leaflet+Shiny

2014-10-15 Thread Miguel Fiandor Gutiérrez
Hola, Ando un poco desesperado con los mapas interactivos de Rcharts https://github.com/ramnathv/rCharts+Leaflet. Estoy intentando pintar en un mapa las cámaras de tráfico de madrid, y las estaciones de calidad del aire, simplemente donde están, es decir, aun no estoy recogiendo los datos de

Re: [R-es] RCharts+Leaflet+Shiny

2014-10-15 Thread daniel
Miguel, Alguna experiencia con rCharts tengo pero no tengo experiencia con el ejemplo que estás haciendo. Creo el problema es que tienes que convertir data_ en un JSON array. Mira la siguiente respuesta de Ramnathv: https://github.com/ramnathv/rCharts/issues/114 donde usa toJSONArray(data_,