[R] Advice on data format

2015-08-05 Thread Trent Yarwood
Hi all, I'm responsible for collating data on antibiotic use at my local group of hospitals. I have data for five different hospitals, about 40 different antibiotics and monthly data going back to 2006. At the moment, I have this stored in 5 datafiles, one for each hospital, formatted as

Re: [R] Advice on data format

2015-08-05 Thread Jim Lemon
Hi Trent, I may be missing something, but I think that if you simply add your column with the hospital code to each of the five data frames: hospital1.df$hospital-hospital1 hospital2.df$hospital-hospital2 ... and then concatenate (rbind) them you can get what you want without going to a 3D

Re: [R] Advice on data format

2015-08-05 Thread Michael Dewey
Dear Trent If you want them side-by-side in one data frame then you could use merge making sure it only merges by date. I would use sub to change all the anitbiotic names by adding h1 h2 and so on. Then you can sum antibiotic over hospital by using grep to select all the columns containing

[R] GmeanRel vs. mult.icc - differential meaning of icc2 results?

2015-08-05 Thread Alain D.
Dear R-list, let us say I want to report the reliability of group means for HRS (ICC2): library(multilevel) data(bh1996) mult.icc(bh1996[,c(HRS,LEAD,COHES)],grpid=bh1996$GRP) Variable ICC1ICC2 1 HRS 0.129237 0.91713 2 LEAD 0.147462 0.92804 3COHES 0.048049 0.79008 the

Re: [R] write.csv file= question

2015-08-05 Thread Brittany Demmitt
The trial “test” script worked, as well as adding getwd() to my current script also fixed the problem. So it seems “file=“ isn’t necessary after all to run from the terminal. Thanks everyone for your help! :-) On Aug 4, 2015, at 9:20 AM, Ista Zahn istaz...@gmail.com wrote: On Tue, Aug

[R] Question about survival::survfit

2015-08-05 Thread Evan Kransdorf
I am wanting to do a KM curve of two groups using survival. For some reason, the summary(survfit) gives me the following output: records n.max n.start events median 0.95LCL 0.95UCL VAR=N 10931 10931 10931 1646 NA NA NA VAR=Y3452 34523452906 NA

Re: [R] Question about survival::survfit

2015-08-05 Thread Marc Schwartz
On Aug 5, 2015, at 9:25 AM, Evan Kransdorf evan.kransd...@gmail.com wrote: I am wanting to do a KM curve of two groups using survival. For some reason, the summary(survfit) gives me the following output: records n.max n.start events median 0.95LCL 0.95UCL VAR=N 10931

[R] Lattice: raw data and prediction of a non linear fitted function

2015-08-05 Thread François Collin
Dear all, I have a question about lattice use. I would like to use it to represent: - my raw data as points, - and the results of a non linear fit as a line, - having 2 groups data (and so 2 colors). However, as I have few raw data, I would like to increase the number of points to smooth the

[R] (no subject)

2015-08-05 Thread Djossè Parfait
Good morning, I would like to know how often per year is a new full version release of R. Thanks -- Djossè Parfait BODJRENOU Chef de la Division Centralisation et Analyse des Données Statistiques /DPP/MESFTPRIJ [[alternative HTML version deleted]]

[R] nested model and post hoc?

2015-08-05 Thread a_wohl
Hi :-) i am really looking forward to get some help... Since I am a R-beginner I need it. I have a model consisting of the factors: dpi, infection, dissection day and plate. My reskponse variable is cells/mg. dpi is nested in dissection day. They are all fixed variables. I produced this nested

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread Jeff Newmiller
New versions are released when they are ready. This is volunteer-driven software. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#.

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread Martin Morgan
On 08/05/2015 10:08 AM, Jeff Newmiller wrote: New versions are released when they are ready. This is volunteer-driven software. From https://developer.r-project.org/ : The overall release schedule is to have annual x.y.0 releases in Spring, with patch releases happening on an as-needed

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread Marc Schwartz
In addition, there are documents here: https://www.r-project.org/certification.html that cover R’s SDLC (Software Development Life Cycle) that may be helpful. Regards, Marc Schwartz On Aug 5, 2015, at 12:19 PM, Martin Morgan mtmor...@fredhutch.org wrote: On 08/05/2015 10:08 AM, Jeff

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread Uwe Ligges
On 05.08.2015 19:08, Jeff Newmiller wrote: New versions are released when they are ready. This is volunteer-driven software. Actually the plans are a bit more formal: http://developer.r-project.org/ Best, Uwe Ligges

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread Jeff Newmiller
So 3.1.3 to 3.2.0 was a major release? --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread Duncan Murdoch
On 05/08/2015 2:15 PM, Jeff Newmiller wrote: So 3.1.3 to 3.2.0 was a major release? Yes. We do have the oddity (see ?version) that 3 is the major version number and 2.0 is the minor version number including 0 as the patchlevel, but we still call it a major release when the number in the middle

Re: [R] nested model and post hoc?

2015-08-05 Thread Bert Gunter
I rather suspect the problem is primarily statistical, not R related. If at all possible, try to get some local statistical advice. Most probably, you have empty cells in some of the dpi.f by diss.f table. Also, using a Gaussian family and the cells/mg response may be inappropriate: 1 cell in 5

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread peter dalgaard
On 05 Aug 2015, at 20:32 , Duncan Murdoch murdoch.dun...@gmail.com wrote: On 05/08/2015 2:15 PM, Jeff Newmiller wrote: So 3.1.3 to 3.2.0 was a major release? Yes. We do have the oddity (see ?version) that 3 is the major version number and 2.0 is the minor version number including 0 as

Re: [R] Release schedule (was (no subject) )

2015-08-05 Thread Duncan Murdoch
On 05/08/2015 4:36 PM, peter dalgaard wrote: On 05 Aug 2015, at 20:32 , Duncan Murdoch murdoch.dun...@gmail.com wrote: On 05/08/2015 2:15 PM, Jeff Newmiller wrote: So 3.1.3 to 3.2.0 was a major release? Yes. We do have the oddity (see ?version) that 3 is the major version number and 2.0

[R] Simulate skewed data if 2.5, 25th 50th and 75 centile are known

2015-08-05 Thread John Sorkin
Colleagues, I need to simulate skewed data so I can run a sample size calculation. I know the 2.5th, 25th, 50th, and 75th centiles of the data (32, 43, 48, 250). data - matrix(c(75,250,50,48,25,43,2.5,32),nrow=4,ncol=2,byrow=TRUE) dimnames(data) - list(NULL,c(x,y)) data Is there a way I can

Re: [R] nested model and post hoc?

2015-08-05 Thread a_wohl
maybe i have to make my data more clear to you „smile“-Emoticon I am working with stickleback and a parasite. for my experiments I infected the fish, so I have 3 groups in my infected factor (infected, exposed but not infected and naive controll) To get some information about different time points

[R] Installing package caret on a remote server

2015-08-05 Thread Gordonjo
I'm trying to install package caret on a remote server. At first, it told me that I didn't have the necessary dependencies (ggplot2, nplotr, ..., BradleyTerry2). I played with the repositories and the mirrors until I was able to install all of the dependency packages except for BradleyTerry 2.

[R] writing binary data from RCurl and postForm

2015-08-05 Thread Greg Donald
I'm using RCurl with postForm() to post to a URL that responds with a PDF. I cannot figure out how to write the resulting PDF data to a file without corruption. result = postForm(url, binary=TRUE) Both this: capture.output(result, file='/tmp/export.pdf') and this: f = file('/tmp/export.pdf',

[R] aggravating aggregate

2015-08-05 Thread Jim Burke
Greetings R mavens (and that's YOU). Given the following how on earth do I aggregate and sum duplicate PCT rows into one combined row per PCT? Data types str(xxx) 'data.frame': 9 obs. of 3 variables: $ Registered: int 1327 2129 10 433 5 166 1784 17 787 700 $ GA_Total : int 127 150 0 32 1

Re: [R] Simulate skewed data if 2.5, 25th 50th and 75 centile are known

2015-08-05 Thread Bert Gunter
Hint: See below. On Wednesday, August 5, 2015, John Sorkin jsor...@grecc.umaryland.edu wrote: Colleagues, I need to simulate skewed data so I can run a sample size calculation. I know the 2.5th, 25th, 50th, and 75th centiles of the data (32, 43, 48, 250). data -

Re: [R] Simulate skewed data if 2.5, 25th 50th and 75 centile are known

2015-08-05 Thread Marc Schwartz
On Aug 5, 2015, at 4:21 PM, Bert Gunter bgunter.4...@gmail.com wrote: Hint: See below. On Wednesday, August 5, 2015, John Sorkin jsor...@grecc.umaryland.edu wrote: Colleagues, I need to simulate skewed data so I can run a sample size calculation. I know the 2.5th, 25th, 50th, and

Re: [R] writing binary data from RCurl and postForm

2015-08-05 Thread Martin Morgan
On 08/05/2015 11:52 AM, Greg Donald wrote: I'm using RCurl with postForm() to post to a URL that responds with a PDF. I cannot figure out how to write the resulting PDF data to a file without corruption. result = postForm(url, binary=TRUE) Both this: capture.output(result,

Re: [R] aggravating aggregate

2015-08-05 Thread William Dunlap
# your data, from dump(xxx, file=stdout()) xxx - structure(list(Registered = c(1327, 2129, 10, 433, 5, 166, 1784, 17, 787), GA_Total = c(127, 150, 0, 32, 1, 76, 153, 7, 31), PCT = c(1120, 1121, 1121, 1122, 1124, 1125, 1125, 1125, 1126 )), .Names = c(Registered, GA_Total, PCT), class = data.frame,

[R] Knit R and Book Publishing

2015-08-05 Thread Glenn Schultz
Hello All, I have finished my first R package, BondLab, and it will be available in Feb 2016.   I wrote the book and R package concurrently.  Prior, I had very little programming experience other than VBA and using others R packages.  

Re: [R] Lattice: raw data and prediction of a non linear fitted function

2015-08-05 Thread Duncan Mackay
Sending again as I pressed the wrong button Hi Your model is overfitted for the number of points - the fitted values bear no resemblance to a line fitting the data - ?too many x values to properly predict ? splines etc library(locfit) ?locfit If you want coefs of sort. You have to do a nls on

[R] Need help with kde2d function in R

2015-08-05 Thread Anamika Chaudhuri
Hi, I am trying to create a bivariate ellipse to see if the true values fall within the 95% confidence ellipse. I am getting subscript out of bounds error in R with following code. Not sure what is causing it. When I use the kde2d function with n=30 I get the error but not for n=25 and below.

Re: [R] writing binary data from RCurl and postForm

2015-08-05 Thread Hadley Wickham
I think that is because the value returned from postForm has an attribute; remove it by casting the return to a vector fl - tempfile(fileext=.pdf) writeBin(as.vector(postForm(url, binary=TRUE)), fl) The httr package might also be a good bet writeBin(content(POST(url)), fl) Or

Re: [R-es] php-R

2015-08-05 Thread Mario Rodriguez via R-help-es
El 04/08/15 a las 20:19, Jose Manuel Veiga del Baño escribió: Estimados colegas: Estoy tratando de ejecutar varios scripts de R a través de php. Para ello estoy utilizando el siguiente código pero me sale: El URL solicitado no ha sido localizado en este servidor. El URL de la página que

[R-es] php-R

2015-08-05 Thread Patricio Fuenmayor Viteri
Hola...Otra forma y mas robusta.. pienso yo, es usar PL/R http://www.joeconway.com/plr/de esta forma llamas a procedimientos almacenados en postgres y entiendo yo que es mas f�cil la interacci�n entre php y postgres.Es una idea, y de paso ganas mucho en la administraci�n de datos Patricio.

[R-es] paquetes twitteR

2015-08-05 Thread Jose Ramirez Costa
Buen dia, quisiera usar el paquete twitteR para hacer analisis de texto con el paquete tm, pero no puedo hacer la autentificacion con el OAuth. Alguien me podria dar los pasos a seguir? Gracias José -- Abraza la incertidumbre, es un intento de tener una filosofía de vida para agarrarme de

Re: [R-es] paquetes twitteR

2015-08-05 Thread Carlos Ortega
Hola, A finales del año pasado, se preguntó por esto mismo. Aquí puedes ver la cadena de dudas/consejos/soluciones... http://grokbase.com/t/r/r-help-es/14b1pj7y1n/r-es-pregunta-creo-que-simple-para-usar-twitter Saludos, Carlos Ortega www.qualityexcellence.es El 5 de agosto de 2015, 20:06, Jose

Re: [R-es] php-R

2015-08-05 Thread Carlos Ortega
Hola, No sé si todavía es útil...: http://stats.stackexchange.com/questions/4279/how-can-i-integrate-r-with-php Saludos, Carlos Ortega www.qualityexcellence.es El 4 de agosto de 2015, 20:19, Jose Manuel Veiga del Baño chem...@um.es escribió: Estimados colegas: Estoy tratando de ejecutar

Re: [R-es] paquetes twitteR

2015-08-05 Thread Jose Ramirez Costa
Gracias Carlos voy a probar siguiendo esos mensajes. El 5 de agosto de 2015, 15:16, Carlos Ortega c...@qualityexcellence.es escribió: Hola, A finales del año pasado, se preguntó por esto mismo. Aquí puedes ver la cadena de dudas/consejos/soluciones...

Re: [R-es] php-R

2015-08-05 Thread Javier Rubén Marcuzzi
Estimados Yo supe colocar algunas cosas entre php y R, pero creo que hoy hay una pregunta anterior, ¿tienes acceso al servidor?, ¿Qué sistema operativo? ¿Qué base de datos? ¿Qué se usa para interactuar (html5, rest)? Porque posiblemente hoy es necesario pasar por php, r tiene herramientas para