Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
Yes, I am aware of this situation and I agree that it is better to force f. I was simply trying to figure out why it was necessary in this particular program where the only repeated assignment anywhere in the code is in trampoline, in a scope none of the thunks can see. What ever my problem

Re: [R] Unexpected behavior with cbind.ts

2016-08-10 Thread John Kane
It would help if you showed us the code you have been using so far plus some sample data (use dput() to produce it) can really help. See ttp://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example http://adv-r.had.co.nz/Reproducibility.html John Kane Kingston ON

[R-es] Si hay problemas de rendimiento o memoria

2016-08-10 Thread javier.ruben.marcuzzi
Estimados: Hoy vi un artículo que da recursos en https://msdn.microsoft.com/en-us/microsoft-r, hay mezcla de propietario, GNU, licencias pagas y licencias que se pueden utilizar. Si hay problemas de rendimiento hay disponibles algunas herramientas. Javier Rubén Marcuzzi

Re: [R] Extracting dates to create a new variable

2016-08-10 Thread Adams, Jean
Try this. dfsub <- df[df$deps %in% c("CC", "DD", "FF"), ] names(dfsub) <- c("Subject", "newdate", "origdep") final <- merge(df, dfsub) Jean On Wed, Aug 10, 2016 at 10:58 AM, Farnoosh Sheikhi via R-help < r-help@r-project.org> wrote: > blockquote, div.yahoo_quoted { margin-left: 0 !important;

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Duncan Murdoch
On 10/08/2016 2:39 PM, Thomas Mailund wrote: Ok, I think maybe I am beginning to see what is going wrong... Explicitly remembering the thunk parameters in a list works fine, as far as I can see. make_thunk <- function(f, ...) { remembered <- list(...) function(...) do.call(f,

Re: [R] R Listen to a Web GUI

2016-08-10 Thread Ulrik Stervbo
Hi Glenn, Shiny and shinydashboards might be what you are looking for. Best, Ulrik On Wed, 10 Aug 2016, 22:03 Glenn Schultz, wrote: > All, > > I need to create a function that listens to a web GUI interface and then > responds by running the needed R function. How can I

[R] Unexpected behavior with cbind.ts

2016-08-10 Thread Caio Guimarães Figueiredo
I got two ts variables (w and y) that I want to cbind into a mts matrix variable. w is a simple ts object with some random data, length=40, start = 2005, end = 2014.75, frequency = 4, class = "ts". y is a collection of 2 ts, nrow = 40, ncol=2, start = 2005, end = 2014.75, frequency = 4, class =

[R] R Listen to a Web GUI

2016-08-10 Thread Glenn Schultz
All, I need to create a function that listens to a web GUI interface and then responds by running the needed R function. How can I do that with R? Can anyone recommend what packages I should consider. Glenn __ R-help@r-project.org mailing list --

[R] Extracting dates to create a new variable

2016-08-10 Thread Farnoosh Sheikhi via R-help
blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Hi  I have a data set like below and wanted to create a new date variable by extracting the dates for specific departments.I

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
  Ok, I think maybe I am beginning to see what is going wrong... Explicitly remembering the thunk parameters in a list works fine, as far as I can see. make_thunk <- function(f, ...) {   remembered <- list(...)   function(...) do.call(f, as.list(remembered)) } thunk_factorial <- function(n,

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
  Well, they stay at 3 when I call cat (except for the final step going down in they recursion where `identity` is called, where they are 4). They do that both when I evaluate ... in the `make_thunk` function and when I don’t. But then, when I call `cat` it also worked before. I cannot keep

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread William Dunlap via R-help
You may gain some understanding of what is going on by adding the output of sys.nframe() or length(sys.calls()) to the cat() statement. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Aug 10, 2016 at 9:59 AM, Thomas Mailund wrote: > An alternative implementation,

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
  I am not sure I can see exactly how the parameters are changing at all, regardless of which of the versions I am using. Nowhere in the code do I ever modify assign to a variable (except for defining the global-level functions). I think my problem is that I don’t really understand ... here. I

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Duncan Murdoch
On 10/08/2016 1:10 PM, Thomas Mailund wrote: That did the trick! I was so focused on not evaluating the continuation that I completely forgot that the thunk could hold an unevaluated value… now it seems to be working for all the various implementations I have been playing around with. I

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
On 10 Aug 2016, at 19:15, Bert Gunter > wrote: make_thunk is probably unnecessary and apparently problematic. I think you could use do.call() instead, as do.call(f,list(...)) . Yes, make_thunk <- function(f, ...) function() do.call(f,

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
But wait, how is it actually changing? And how did calling `cat` make the problem go away? Ok, I will go think about it… Thanks anyway, it seems to do the trick. > On 10 Aug 2016, at 19:10, Thomas Mailund wrote: > > > That did the trick! > > I was so focused on not

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Bert Gunter
make_thunk is probably unnecessary and apparently problematic. I think you could use do.call() instead, as do.call(f,list(...)) . -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his

Re: [R] Conditionally remove rows with logic

2016-08-10 Thread jim holtman
try this: > input <- read.table(text = "ID TIME LABEL + 100 + 130 + 160 + 190 + 112 1 + 115 0 + 118 0 + 200 + 23

Re: [R] Proving (instead of rejecting) that two groups are actually equal

2016-08-10 Thread Marc Schwartz
> On Aug 10, 2016, at 5:22 AM, Dominik Marti wrote: > > Hej R helpers > > The standard in statistical hypothesis testing is to reject the null > hypothesis that there is a difference between groups, i.e. to "prove" the > alternative. However, failing to reject the null

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
That did the trick! I was so focused on not evaluating the continuation that I completely forgot that the thunk could hold an unevaluated value… now it seems to be working for all the various implementations I have been playing around with. I think I still need to wrap my head around *why*

Re: [R] Proving (instead of rejecting) that two groups are actually equal

2016-08-10 Thread Bert Gunter
Rejecting a null of "inequality" is the standard setup for equivalence testing in medical contexts. Search on "equivalence testing in R" and you will find what you need. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Duncan Murdoch
On 10/08/2016 12:53 PM, Thomas Mailund wrote: > On 10 Aug 2016, at 13:56, Thomas Mailund wrote: > > make_thunk <- function(f, ...) f(...) Doh! It is of course this one: make_thunk <- function(f, ...) function() f(…) It just binds a function call into a thunk so I can

[R] TIF Mean pixel values

2016-08-10 Thread Mike Smith
Hi Im experimenting with mean pixel values for a series of images from a DSLR. I import 16-bit TIFs (RGB) from a directory using the following code, then loop through adding each TIF before dividing by the total number of files to give an image of mean pixel values. Some quick questions:

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
An alternative implementation, closer to what I need when I have more than one recursion in each step, but still using factorial as the example, is this one: thunk_factorial <- function(n, continuation = identity) { force(continuation) # if I remove this line I get an error cat("call: ", n,

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
> On 10 Aug 2016, at 13:56, Thomas Mailund wrote: > > make_thunk <- function(f, ...) f(...) Doh! It is of course this one: make_thunk <- function(f, ...) function() f(…) It just binds a function call into a thunk so I can delay its evaluation. Sorry Thomas

Re: [R] It is possible to use "input parameters" with "standard error" in fitting function nls

2016-08-10 Thread Vicente Martí Centelles
Dear all, I found the solution to my question on internet: https://www.r-bloggers.com/introducing-propagate/ The ‘propagate’ package on CRAN can do this It has one single purpose: propagation of uncertainties (“error propagation”). predictNLS: The propagate function is used to calculate the

Re: [R] Continuation-parsing / trampoline / infinite recursion problem

2016-08-10 Thread Thomas Mailund
  Oh, I see that the make_thunk function is missing in my example. It is just this one make_thunk <- function(f, ...) f(...) On 9 August 2016 at 21:57:05, Thomas Mailund (mail...@birc.au.dk(mailto:mail...@birc.au.dk)) wrote: > [I’m really sorry if you receive this mail twice. I just

[R] Proving (instead of rejecting) that two groups are actually equal

2016-08-10 Thread Dominik Marti
Hej R helpers The standard in statistical hypothesis testing is to reject the null hypothesis that there is a difference between groups, i.e. to "prove" the alternative. However, failing to reject the null hypothesis does not prove it; its rejection just fails. Now, as stated in the article

Re: [R] Error while fitting gumbel copula

2016-08-10 Thread Martin Maechler
> Isaudin Ismail > on Tue, 9 Aug 2016 14:30:18 +0100 writes: > Dear R experts, > I have 5 time series of data (A, B, C, D and E) with all same lengths. All > series exhibit gamma distribution except for B which is lognormal > distribution. I am

Re: [R-es] ¿Qué hace as.numeric()?

2016-08-10 Thread patricio fuenmayor
De nada... He leído lo que has escrito... Bueno, hay muchas formas de hacer las cosas... te recomiendo que uses el paquete data.table (pero la versión en desarrollo 1.9.7 ) https://github.com/Rdatatable/data.table/wiki la que te ayudará en el tema de memoria... Otra cosa que te recomiendo es que

Re: [R] funnel plot asymmetry

2016-08-10 Thread BONACHE Adrien via R-help
Dear Christos, Maybe you should read it before using Egger's test : http://www.cienciasinseso.com/en/tag/eggers-test/If you still want to perform Egger's test, use metafor : R: Test for funnel plot asymmetry |   | |   |   |   |   |   | | R: Test for funnel plot asymmetrymetabias.meta {meta} R

Re: [R] Calculate mileage at each 'faildate'

2016-08-10 Thread PIKAL Petr
Hi I wonder what do you want to do with intended output. You can get required numbers by lll <- split(simD, simD$ID) lapply(lll, function(x) c(min(x[, "MILEAGE"]), diff(x[,"MILEAGE"]))) $A [1] 21548 1030 290 786 $B [1] 30245 1903 1980 1751 3995 251 Then pad it with NA

Re: [R] Diethelm Wuertz (founder 'Rmetrics')

2016-08-10 Thread Spencer Graves
Diethelm and Barbara very generously invited me into their home after I had contacted Diethelm asking about Rmetrics prior to visiting Zürich years ago. I agree with Martin. His legacy will live on via the Rmetrics code and companion books. I don't know if anyone else will be able to

[R] Calculate mileage at each 'faildate'

2016-08-10 Thread Abhinaba Roy
Hi R-helpers, - I have a dataframe similar to 'simD'. > dput(simD) structure(list(ID = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("A", "B"), class = "factor"), PRODDATE = structure(c(14655, 14655, 14655, 14655, 14664, 14664, 14664, 14664, 14664, 14664 ), class = "Date"),

Re: [R] cpquery problem

2016-08-10 Thread Marco Scutari
Hi Ross, On 4 August 2016 at 09:37, Ross Chapman wrote: > The network that I am working on has the following coefficients for the > node that I am interested in (ABW): > > Parameters of node ABW (conditional Gaussian distribution) > > Conditional density: ABW |

Re: [R] Calendar embedded for event scheduling

2016-08-10 Thread Sriram Kumar
Dear jim , Thanks jim lemon for your reply but i need a calendar for marking my event for a period or for a day not the gantt chart because the calendar event means can also update by user .and view by anyone but not in gantt chart..please can you provide any widgets or any other

[R] Diethelm Wuertz (founder 'Rmetrics')

2016-08-10 Thread Martin Maechler
Dear colleagues We are deeply saddened to inform you that Diethelm and his wife Barbara Würtz (ascii-fied 'Wuertz') died in a car accident during their vacation in Hungary last week. Both, Diethelm and Barbara worked at the ETH Zurich, Diethelm as a researcher and teacher in the Institute for

Re: [R] Calendar embedded for event scheduling

2016-08-10 Thread Jim Lemon
Hi Sri Ram, Do you mean that you want to produce a Gantt chart? Have a look at the example for gantt.chart in the plotrix package. Jim On Wed, Aug 10, 2016 at 2:58 PM, Sriram Kumar wrote: > Dear all, > > i am presently doing the r codes for developing the shiny app fro