Re: [R] Working with very large datasets and generating an executable file

2020-05-07 Thread Jeff Newmiller
There is no executable that can run on any OS. As for python... it is hardly the only game in town for building executables, but it and those other options are off topic here. On May 6, 2020 10:53:00 PM PDT, Paul Bernal wrote: >Dear Jeff, > >Thank you for the feedback. So, after reading your

Re: [R] Working with very large datasets and generating an executable file

2020-05-07 Thread Paul Bernal
That could be the answer, yes. El jue., 7 de mayo de 2020 1:22 a. m., escribió: > Or maybe a Shiny Application? > > On 7 May 2020 06:53, Paul Bernal wrote: > > Dear Jeff, > > Thank you for the feedback. So, after reading your comments, it seems > that, > in order to develop an executable model

Re: [R] Working with very large datasets and generating an executable file

2020-05-07 Thread Jeff Newmiller
You could deploy a rocker image, possibly with an API (built with plumber). But I think it is misleading to refer to that as an executable. On May 6, 2020 11:39:09 PM PDT, Paul Bernal wrote: >Dear Jeff, an executable in terms of deploying a machine learning >model, >whether it a classifocation,

Re: [R] Working with very large datasets and generating an executable file

2020-05-07 Thread Paul Bernal
Dear Jeff, an executable in terms of deploying a machine learning model, whether it a classifocation, regression, time series or deep learning model. Best regards, Paul El jue., 7 de mayo de 2020 1:22 a. m., Jeff Newmiller < jdnew...@dcn.davis.ca.us> escribió: > There is no executable that can

Re: [R] COVID-19 datasets...

2020-05-07 Thread Thomas Petzoldt
On 07.05.2020 at 11:19 Deepayan Sarkar wrote: On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote: Sorry if I'm joining a little bit late. I've put some related links and scripts together a few weeks ago. Then I stopped with this, because there is so much. The data format employed by John

Re: [R] COVID-19 datasets...

2020-05-07 Thread Deepayan Sarkar
On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote: > > Sorry if I'm joining a little bit late. > > I've put some related links and scripts together a few weeks ago. Then I > stopped with this, because there is so much. > > The data format employed by John Hopkins CSSE was sort of a big

Re: [R] unstable results of nlxb fit

2020-05-07 Thread J C Nash
The double exponential is well-known as a disaster to fit. Lanczos in his 1956 book Applied Analysis, p. 276 gives a good example which is worked through. I've included it with scripts using nlxb in my 2014 book on Nonlinear Parameter Optimization Using R Tools (Wiley). The scripts were on Wiley's

[R] Possible bug in optimize (related to naming the arguments)

2020-05-07 Thread Søren Højsgaard
Dear all, I am wondering if there is a minor bug in the optimimize function; please see below: --- > ## example taken from optimize documentation > f <- function (x, a) (x - a)^2 > xmin <- optimize(f, c(0, 1), tol = 0.0001, a = 1/3) > xmin $minimum [1] 0.333 $objective [1] 0 > ## if we

[R] unstable results of nlxb fit

2020-05-07 Thread PIKAL Petr
Dear all I started to use nlxb instead of nls to get rid of singular gradient error. I try to fit double exponential function to my data, but results I obtain are strongly dependent on starting values. tsmes ~ A*exp(a*plast) + B* exp(b*plast) Changing b from 0.1 to 0.01 gives me completely

Re: [R] COVID-19 datasets...

2020-05-07 Thread Deepayan Sarkar
On Thu, May 7, 2020 at 4:16 PM Thomas Petzoldt wrote: > > On 07.05.2020 at 11:19 Deepayan Sarkar wrote: > > On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote: > >> > >> Sorry if I'm joining a little bit late. > >> > >> I've put some related links and scripts together a few weeks ago. Then I

[R] [R ] Writing loop to estimate ARCH test for a multiple columns of a data frame?

2020-05-07 Thread Subhamitra Patra
Dear R-users, I want to estimate ARCH test for multiple columns (i.e., from 2:21 COLUMNS ) in my data. For this purpose, I want to run a loop to calculate ARCH test results for each column in the data frame. I tried by using for loop and lapply function, but unable to write a loop for computing

Re: [R] COVID-19 datasets...

2020-05-07 Thread Thomas Petzoldt
On 07.05.2020 at 13:12 Deepayan Sarkar wrote: On Thu, May 7, 2020 at 4:16 PM Thomas Petzoldt wrote: On 07.05.2020 at 11:19 Deepayan Sarkar wrote: On Thu, May 7, 2020 at 12:58 AM Thomas Petzoldt wrote: Sorry if I'm joining a little bit late. I've put some related links and scripts together

[R] Change the colours of some of the labels of the x-axis

2020-05-07 Thread Stefano Sofia
Dear R users, in a plot I need to change the colours of some of the labels of the x-axis. In the example below reported, I would like to have the labels of the last and second-last date in red. I tried to find the solution searching the web, but I could not understand the hints and I was not

Re: [R] unstable results of nlxb fit

2020-05-07 Thread Duncan Murdoch
As John said, sums of exponentials are hard. One thing that often helps a lot is to use the partially linear structure: given a and b, you've got a linear model to compute A and B. Now that you're down to two nonlinear parameters, you can draw a contour plot of nearby values to see how much

Re: [R] Possible bug in optimize (related to naming the arguments)

2020-05-07 Thread Peter Dalgaard
Partial matching is a feature regretted by its designer, but is not really possible to remove at this point. One early change in R relative to S was to require full match of anything after "...", but as you have noticed, that does not apply for interval= So, "don't do that, then" -pd > On 7

Re: [R] Change the colours of some of the labels of the x-axis

2020-05-07 Thread Rui Barradas
Hello, You cannot pass a vector of colors to col.axis, you need to plot the axis twice, once the normal axis, like in your code, then overplot just those last 2 labels. xlabels <- seq(trunc(as.POSIXct(first_day, format="%Y-%m-%d-%H-%M"), "days"), trunc(as.POSIXct(last_day,

Re: [R] Possible bug in optimize (related to naming the arguments)

2020-05-07 Thread Ege Rubak
Dear Søren, I suspect that the good R souls wouldn't consider this a bug, but a logical consequence of the R language design. It is of course a valid question whether this should be explicitly mentioned in documentation. If I recall correctly about function evaluation: First all named arguments

Re: [R] [R ] Writing loop to estimate ARCH test for a multiple columns of a data frame?

2020-05-07 Thread Jim Lemon
Hi Subhamitra, For some reason, your data didn't make it through. Maybe you tried to send an .xls or .xlsx file. If so, export it as CSV or if it's not too big, just paste the text into your email. Jim On Thu, May 7, 2020 at 10:30 PM Subhamitra Patra wrote: > > Dear R-users, > > I want to

Re: [R] unstable results of nlxb fit

2020-05-07 Thread Bernard McGarvey
John/Petr, I think there is an issue between a global optimum and local optima. I added a multistart loop around the code to see if I could find different solutions. Here is the code I added (I am not a great coder so please excuse any inefficiencies in this code segment): # Multistart

[R] Adding overlap legend to a histogram

2020-05-07 Thread Ogbos Okike
Dear Experts, Greetings. I am trying to display two datasets in a histogram. I have been able to plot the graph and added the legend for the two colors. I am, however, having difficulties adding a legend to represent the regions of overlap (the third legend). Below are my data and code. Thank

Re: [R] unstable results of nlxb fit

2020-05-07 Thread J C Nash
These results reflect my experience with this sort of problem. A couple of comments: 1) optimx package has a multistart wrapper. I probably should have written one for nlsr. Maybe Bernard and I should work on that. The issues are largely to make things resistant to silly inputs, which even the

[R] Replication : How to get only 1 value

2020-05-07 Thread varin sacha via R-help
Dear R-experts, My goal is to get only 1 value : the average/ the mean of the 100 MSE values. How can I finish my R code ? ### my.experiment <- function()  { n<-500 x<-runif(n, 0, 5) z <- rnorm(n, 2, 3) a <- runif(n, 0, 5)

Re: [R] Replication : How to get only 1 value

2020-05-07 Thread Rui Barradas
Hello, That's just mean(my.data) Note that summary(t(my.data)) also gives the mean. (You need to transpose because the way you ran replicate outputs a 1x100 matrix.) Hope this helps, Rui Barradas Às 21:17 de 07/05/20, varin sacha via R-help escreveu: Dear R-experts, My goal is to

Re: [R] Adding overlap legend to a histogram

2020-05-07 Thread Jim Lemon
Hi Ogbos, I don't think that your example allows us to work out what you are trying to do. For one thing, "x1" and "x2" do not overlap. Also, you are plotting the frequencies of dates of observations, which may not be what you want. The following code will correctly display your example:

[R] Error: Cannot use `+.gg()` with a single argument.

2020-05-07 Thread Ana Marija
Hello, I got this error: Error: Cannot use `+.gg()` with a single argument. Did you accidentally put + on a new line? After running this: data(murders) library(ggplot2) library(dplyr) library(ggplot2) ggplot(data=murders) #define the slope of the line r<-murders %>%

Re: [R] Error: Cannot use `+.gg()` with a single argument.

2020-05-07 Thread Richard M. Heiberger
It is just like the message suggested. You have a + at the end of each line and the beginning of the next. The one at the end is required. The ones at the beginning are causing the error message. Please put spaces around your assignment arrows. Difficult to read: r<-murders Easy to read:r

Re: [R-es] Error implementando FeatureImp$new del paquete iml

2020-05-07 Thread Emilio L. Cano
Hola, Te faltará cargar los paquetes antes de ejecutar, esto funciona: library(randomForest) library(MASS) library(iml) data("Boston", package = "MASS") rf <- randomForest(medv ~ ., data = Boston, ntree = 50) X <- Boston[which(names(Boston) != "medv")] predictor <- Predictor$new(rf, data = X, y =

Re: [R-es] Error implementando FeatureImp$new del paquete iml

2020-05-07 Thread Marcelino de la Cruz Rot
Hola Manuel: A mi no me da error. Supongo que tendrá que ver con la versión de R o del paquete iml o randomForest. en mi caso, 4.0-0,  0.10-0 y 4.6-14 respectivamente. Un saludo, Marcelino > data("Boston", package = "MASS") > rf <- randomForest(medv ~ ., data = Boston, ntree = 50) > X <-

[R-es] Error implementando FeatureImp$new del paquete iml

2020-05-07 Thread Manuel Mendoza
Hola de nuevo. Al aplicar el comando FeatureImp del paquete iml me daba este error: Error in as.double(y) : cannot coerce type 'environment' to vector of type 'double' Me fui al ejemplo original con la base de datos Boston, para ver las diferencias con mi script, y para mi sorpresa, da el mismo