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 e

[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.   http://www.amazon.com/Investing-Mortgage-Backed-Securities

[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)),

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", "P

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, file='/tmp/export.p

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 wrote: > > Hint: See below. > > On Wednesday, August 5, 2015, John Sorkin > 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, 4

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 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 <- matrix(c(75,250,50,48,25,43,2.5,32),nrow=4,nco

[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

[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] 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. Now,

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] 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

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 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 mi

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

2015-08-05 Thread peter dalgaard
> On 05 Aug 2015, at 20:32 , Duncan Murdoch 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 the > patchlevel,

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 m

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] 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:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead:

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 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 wrote: > > On 08/05/2015 10:08 AM, Jeff Newmiller wrote: >> N

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 basis

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:Basics: ##.#. ##.#. Live Go...

[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 mo

[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] 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 line

Re: [R] Question about survival::survfit

2015-08-05 Thread Marc Schwartz
> On Aug 5, 2015, at 9:25 AM, Evan Kransdorf 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 10931 10931 1

[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] 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 wrote: > > On Tue, Aug 4, 2015 at 11:1

[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

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 containin

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

[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 follows