Re: [R] Problem with MASS::fitdistr().

2020-04-25 Thread Abby Spurdle
I haven't run your example. I may try tomorrow-ish if no one else answers. But one question: Are you sure the "x" and "i" are correct in your function? It looks like a typo... On Sun, Apr 26, 2020 at 2:14 PM Rolf Turner wrote: > > > For some reason fitdistr() does not seem to be passing on the

[R] Problem with MASS::fitdistr().

2020-04-25 Thread Rolf Turner
For some reason fitdistr() does not seem to be passing on the "..." argument "lower" to optim() in the proper manner, and as result falls over. Here is my example; note that data are attached in the file "x.txt". dhse <- function(i,alpha,beta,topn) { x <- seq(0,1,length=topn+2)[-c(1,topn+2

Re: [R] Options for zooming plots other than zm()

2020-04-25 Thread Abby Spurdle
> I am making some plots with plot() which have a fair number of points > (thousands) and I would like to be able to interactively select a > region of the plot and zoom in on it. This doesn't answer your question, but I was wondering why having thousands of data points is problematic? Sometimes

Re: [R] Fit Gaussian curve on my data ?

2020-04-25 Thread Abby Spurdle
Have a look at the dnorm function: ?dnorm Notes: (1) You'd be better to say estimate (or fit) parameters (or coefficients) and plot the resulting normal distribution (or normal density), rather than say fit a density curve, because someone may think you want a kernel density estimate with a Gaussi

Re: [R] Fit Gaussian curve on my data ?

2020-04-25 Thread Ivan Krylov
On Sat, 25 Apr 2020 19:02:59 + (UTC) varin sacha via R-help wrote: > plot(function(d) > k*exp(-0.5*(d-m)^2/sd^2),col=2,add=TRUE,xlim=range(d)) Remove the `add=TRUE` or calculate the values manually and you'll see that the function value is zero because the values in `d` are too big compared

[R] Fit Gaussian curve on my data ?

2020-04-25 Thread varin sacha via R-help
Dear R-experts, I am trying to fit a gaussian density curve. More precisely, I would like to obtain the fitted "Gaussian curve". "m" is the gaussian mean, "sd" is the standard deviation and "k" is an arbitrary scaling parameter (since the gaussian density is constrained to integrate to 1, wher

Re: [R] Problem with loop in folders

2020-04-25 Thread Fredrik Karlsson
Hi, I am sorry if I am misunderstanding what you are trying to do here, but can you simplify it this way? (unfortualtely, this is untested since I dont have a suitable set of files and a directory structure to test against) dbifiles <- list.files(pattern="*.dbi",recursive=TRUE) csvfiles <- gsub

Re: [R] incidence_fit model for simulation

2020-04-25 Thread Vito Michele Rosario Muggeo
dear all, In addition to the thorough and intuitive incidence package, I would like to indicate a technical report on the same topic. R code and worked examples are reported. https://www.researchgate.net/publication/340664370_Modelling_COVID-19_outbreak_segmented_regression_to_assess_lockdow

Re: [R] [EXTERNAL] Re: overlaying graphs in xYplot (Hmisc)

2020-04-25 Thread Deepayan Sarkar
On Wed, Apr 22, 2020 at 11:44 PM Cade, Brian S via R-help wrote: > > All the xYplot() functions using Cbind() or cbind() does just exactly what I > want (Cbind > provides aplot of 3 summary statistics and cbind provides the raw values). I > just cannot > find anyway to overlay them. You are no

Re: [R] Options for zooming plots other than zm()

2020-04-25 Thread Deepayan Sarkar
On Sat 25 Apr, 2020, 12:10 PM Robert Dodier, wrote: > Hi, > > I am making some plots with plot() which have a fair number of points > (thousands) and I would like to be able to interactively select a > region of the plot and zoom in on it. I tried the zoom package which > has the function zm() bu

Re: [R] Options for zooming plots other than zm()

2020-04-25 Thread Jeff Newmiller
Plotly and dygraphs support this. On April 24, 2020 11:11:44 AM PDT, Robert Dodier wrote: >Hi, > >I am making some plots with plot() which have a fair number of points >(thousands) and I would like to be able to interactively select a >region of the plot and zoom in on it. I tried the zoom packa