similar to: help with recursive function

Displaying 20 results from an estimated 400 matches similar to: "help with recursive function"

2017 Dec 14
2
help with recursive function
My own typo ... whoops ... !( any(dat2$norm_sd >= 1 )) On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <ericjberger at gmail.com> wrote: > You seem to have a typo at this expression (and some others like it) > > Namely, you write > > any(!dat2$norm_sd) >= 1 > > when you possibly meant to write > > !( any(dat2$norm_sd) >= 1 ) > > i.e. I think your !
2017 Dec 14
2
help with recursive function
Hi, I accidently left out few lines of code from the calclp function. Updated function is pasted below. I am still getting the same error ?Error: !(any(data1$norm_sd >= 1)) is not TRUE? I would appreciate any help. Nilesh dput(calclp) function (dataset) { dat1 <- funlp1(dataset) recursive_funlp <- function(dataset = dat1, func = funlp2) { dat2 <- dataset %>%
2017 Dec 14
3
help with recursive function
If you are trying to understand why the "stopifnot" condition is met you can replace it by something like: if ( any(dat2$norm_sd >= 1) ) browser() This will put you in a debugging session where you can examine your variables, e.g. > dat$norm_sd HTH, Eric On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <ericjberger at gmail.com> wrote: > The message is coming from
2017 Dec 14
0
help with recursive function
You seem to have a typo at this expression (and some others like it) Namely, you write any(!dat2$norm_sd) >= 1 when you possibly meant to write !( any(dat2$norm_sd) >= 1 ) i.e. I think your ! seems to be in the wrong place. HTH, Eric On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] < nilesh.dighe at monsanto.com> wrote: > Hi, I need some help with running a
2017 Dec 14
0
help with recursive function
Eric: I will try and see if I can figure out the issue by debugging as you suggested. I don?t know why my code after stopifnot is not getting executed where I like the code to run the funlp2 function when the if statement is TRUE but when it is false, I like it to keep running until the stopifnot condition is met. When the stopifnot condition is met, I like to get the output from if statement
2017 Dec 14
0
help with recursive function
Eric: Thanks for taking time to look into my problem. Despite of making the change you suggested, I am still getting the same error. I am wondering if the logic I am using in the stopifnot and if functions is a problem. I like the recursive function to stop whenever the norm_sd column has zero values that are above or equal to 1. Below is the calclp function after the changes you suggested.
2017 Dec 14
0
help with recursive function
The message is coming from your stopifnot() condition being met. On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] < nilesh.dighe at monsanto.com> wrote: > Hi, I accidently left out few lines of code from the calclp function. > Updated function is pasted below. > > I am still getting the same error ?Error: !(any(data1$norm_sd >= 1)) is > not TRUE? > > >
2017 Dec 14
1
help with recursive function
Your code contains the lines stopifnot(!(any(data1$norm_sd >= 1))) if (!(any(data1$norm_sd >= 1))) { df1 <- dat1 return(df1) } stop() "throws an error", causing the current function and all functions in the call stack to abort and return nothing. It does not mean to stop now and return a result. Does the function give
2015 May 28
2
La ejecución de mi script R es muy lenta
En el correo anterior se me olvidó mencionar que trabajo con Rstudio El 28 de mayo de 2015, 15:18, MªLuz Morales <mlzmrls en gmail.com> escribió: > Hola, > soy nueva en esta lista y también en R. Yo he realizado un script en R > que carga dos archivos csv, uno de ellos con casi 2 millones de filas. El > programa carga esos archivos a data frame, y se trata simplemente de >
2015 May 28
2
La ejecución de mi script R es muy lenta
Hola, Si no tienes inconveniente en compartir tu conjunto de datos (puedes dejarlo en un Dropbox y compartir enlace) o incluir una salida de la variables: "seta" y "outcomes" (función "save.image()") con eso podemos darte alguna solución mucho más rápida que la que planteas. En tu código con un bucle estás tratando de rellenar una lista que son los diferentes
2015 May 29
3
Mi script R es muy lento
Hola, quiero compartir con vosotros mi problema y la solución que me han planteado. Mi programa carga Outcomes.csv y Set-A.csv (descargados de http://garrickadenbuie.com/blog/2013/04/11/visualize-physionet-data-with-r/, apartado Getting Started --> the code and the data set) de unos 50MB entre los dos. Mi código era: # Transforma csv a data frame seta <- read.csv('Set-A.csv');
2015 Jun 01
2
Mi script R es muy lento
Hola Carlos, bueno la verdad es que mi pregunta era algo general, cuando no has usado data.table no parece muy intuitivo pasar de la forma de programar a la que estás más acostumbrado (bucles, notación matricial...) a esa otra. Aun no tengo un cálculo complejo concreto pero lo tendré que hacer... solo quería saber si se puede, y parece que sí, asi que será cuestión de empaparse un poco de
2003 Jul 22
1
Processing a large number of files
I maintain the Devore5 package which contains the data sets from the 5th edition of Jay Devore's text "Probability and Statistics for Engineering and the Sciences". The 6th edition has now been published and it includes several new data sets in exercises and examples. In addition, some exercises and examples from the 5th edition are renumbered in the 6th edition. I face the
2008 Jun 17
2
Can't find next message offset
Hi, I am getting a lot of warnings since upgrading to 1.1rc10 (from rc4): mbox /home2/seta/Mail/Sent: Can't find next message offset for uid=12 Almost always, it is the Sent or Trash folders that are giving these. Users aren't experiencing any problems, but the errors continue to come. Is this something I should be concerned about? Here is output of "dovecot -n": #
2009 Dec 14
6
write.csv and header
Dear list, I would like to export a matrix to a TXT-File by using write.csv (not necessarily). Is there a way to add a header (with additional informations concerning the project) spanning multiple lines to this file before the actual data are listed up? Should look like this: date: filename: number of permutations: ------------ data (as a matrix) Any suggestions? Thnx in advance.
2011 Jun 07
0
ID50 i) comparisons ii) dose.p vs Reed-Muench
I'm analysing some ID50 data for 2 different groups and had already calculated this by hand using Reed-Muench formula, when I came across the dose.p function in R. I have 2 queries: 1) dose.p gives me a different answer to Reed-Muench, and actually I suspect wrong answer, given that the dose.p result dosage stated to infect 50% is actually stronger than the dose used in my experiments caused
2012 May 04
1
Bug NOT fixed in wine-1.5.3
Hi, just a note to alert you, bug #27157 is marked fixed but it's not, only OSSv4 users have sound with brink game, alsa and pulseaudio users don't have sound with this game, tested with vanilla wine-1.5.2 and wine-1.5.3. I test with both "dsound" and "OpenAL" mode for this game, with and without dsound.dll presence in the prefix. I can't test with coreaudio (OSX
2018 Jan 08
2
Relationship between clang, opt and llc
2018-01-07 23:16 GMT-08:00 toddy wang <wenwangtoddy at gmail.com>: > -mllvm <value> Additional arguments to forward to LLVM's option > processing > > This is dumped by clang. I am not sure what I am supposed to put as value > in order to tune unrolling/inlining threshold. > As the help says, this is used to pass argument to LLVM itself. If you remember
2011 Apr 09
2
best practice(s) for retrieving a local variable from a closure
Greetings, Say I have defined mp <- function(a) function(x) x^a f2 <- mp(2) and I would like to retrieve the "a" which is local to f2. Two options come to mind; get("a", envir=environment(f2)) eval(substitute(a), environment(f2)) I'm curious if one of these is preferred over the other in terms of efficiency, robustness, aesthetics, etc. Or perhaps
2010 May 27
1
stripplot, lattice
hello, i can't figure out how to set position of panels of my stripplot - i`d like the panels of one level of the factor stage (nr. of panels within each stage, A: 12, B: 12, C: 12, D: 4, each panel representing a site) to be in one column, with A to D from left to right and with descending site.nr at each row. like: A1 B1 C1 D1 A2 B2 .. .. A3 .. .. .. how is this achieved? any help