similar to: programming to calculate variance

Displaying 20 results from an estimated 2000 matches similar to: "programming to calculate variance"

2010 Aug 06
1
[OT] R on Atlas library
Dear List, I am aware this is slightly off-topic, but I am sure there are people who already had the problem and who perhaps solved it. I am running long-lasting model fits using constrOptim command. At work there is a linux computer (Quad Core, debian) on which I already have compiled R and Atlas, in the hope that things will go faster on that machine. Atlas offers the possibility to be
2009 May 29
3
How to replace Inf by zero?
Hi R users, Someone knows how to replace Infinite value by zero. I have a vector with some Inf value and I want to substitute these values by zero to get the mean of the components of the vector. Any idea? Many thanks, Marlene. [[alternative HTML version deleted]]
2010 Feb 01
2
programing problem with for( )
Hi R-users I'm writing a code to run a fuction but I found an error that I can't fix. I reproduced the error with a simple example. The correct answer is k but I can't fill my s matrix. What I'm doing wrong? s<-matrix(data=NA,nrow=1,ncol=5 ) s for(i in 1:5) { k=sqrt(i) s[,i]<-k[i] print(k) } s Thanks in advance, Marlene. [[alternative
2011 Sep 16
2
problems to report indexes when I have two min value
Hi, I need to repor the index of a min value of each row in a matrix, but I don't know how to do that when I have more than one min value. Here is my example > dat <- matrix(c(5.4,4.8,5.6,4.8,NA,4.4,4.6,3.4,NA,NA,4,2.4,NA,NA,NA,2),byrow=TRUE,ncol=4) > dat [,1] [,2] [,3] [,4] [1,] 5.4 4.8 5.6 4.8 [2,] NA 4.4 4.6 3.4 [3,] NA NA 4.0 2.4 [4,] NA NA NA 2.0
2012 Feb 07
1
Nuevo paquete SCperf en CRAN
Queridos miembros de la lista, Me gustaría anunciar que el paquete ''SCperf " ya está disponible en CRAN. El paquete implementa diferentes modelos de inventario, el efecto látigo y otras variables de desempeño de la cadena de suministro. Esta es la primera versión del paquete y también es mi primer paquete para R. Sugerencias, informes de errores y otros comentarios son
2009 Aug 03
1
How to get w and b in SVR? (package e1071)
Dear R users, I'm running a SVR in package e1071 but I did not able to calculate the parameters w and b of the regression. I don't know how to do that and if it is possible to do it with this package. Someone have some idea. Any help would be much appreciated. Marlene [[alternative HTML version deleted]]
2010 Jul 19
1
hola
Hola amor! Finalmente llegué a D.C. Ya estoy en el albergue pero el cuarto solo va a ser liberado a la una o tal vez dos de la tarde. Pero no importa al menos ya estoy aqui, ya tomé desayuno que por cierto es horrible. Voy a poder tomar baño y usar un locker por un dolar. Entonces voy a tomar baño guardar mis cosas y salir ya que aqui no hago nada. Cómo fue tu domingo? Cómo está Esteban? El
2016 Jun 15
5
Hadoop
Hola buenas, me preguntaba si alguno usa hadoop Spark en su día día y si me podíais recomendar un buen curso para empezar. Estuve en la charla de meetup de madrid hace unos meses de Rspark y estuvo bien, ahora me preguntaba si es posible profundizar. Pero me gustaría tener recomendaciones de cualquier material que podáis recomendar, cursos de coursera que hayais hecho, libros que hayais leido,
2010 Nov 05
1
filled.contour colorbar without black color separators?
Dear list members, I have been using filled.contour in order to plot EEG data. For the colors, I used a conventional ramp from blue to red (blue - green - yellow - red), and 100 color levels to make the plot looking smooth: (...) color.palette = colorRampPalette(c('blue','green', 'yellow','red'), space='rgb'), nlevels = 100 (...) My problem ist that
2006 Mar 26
1
new to the list - problems with non-solid lines in eps export
Dear all, I am new to this list and, unfortunately, could not provide help to anyone as yet. I hope I can do so in the future, though! Until then, I am grateful for helpful hints from you more experienced users. For use in an upcoming publication, I generated an eps figure from my x11 window under Debian Linux with dev.copy2eps. It contains 28 line plots with 2 lines each, one solid and one
2020 Nov 04
2
sprintf, check number of parameters
Dear Tomas,Thank you.Regarding the "unnumbered" arguments, i.e. sprintf('%f %f', 1, 2, 3). This was the case I wanted to report, here a warning can be very useful.Regarding the "numbered" arguments, that is, sprintf('%$1f %$3f', 1, 2, 3). Here, omission of an argument might be intended, for example, in an application with support for multiple languages.
2004 Jul 14
2
constrOptim and function with additional parameters?
How can I use a function with some additional input parameters in constrOptim? For example, something like fr <- function(x,a) { ## Rosenbrock Banana function x1 <- x[1] x2 <- x[2] a * (x2 - x1 * x1)^2 + (1 - x1)^2 } where the optimum is to be found w.r.t. x. Calling optim(c(-1.2,1), fr, NULL, a=100) works as expected, but I fail to provide the a=100 in the constrained case:
2017 Sep 02
2
Strange lazy evaluation of default arguments
Another way to avoid the problem is to not redefine variables that are arguments. E.g., > Su3 <- function(u=100, l=u, mu=0.53, sigma2=4.3^2, verbose) { if (verbose) { print(c(u, l, mu)) } uNormalized <- u/sqrt(sigma2) lNormalized <- l/sqrt(sigma2) muNormalized <- mu/sqrt(sigma2) c(uNormalized, lNormalized, muNormalized) } > Su3(verbose=TRUE)
2017 Sep 02
6
Strange lazy evaluation of default arguments
Dear R developers, sessionInfo() below Please have a look at the following two versions of the same function: 1. Intended behavior: > Su1 = function(u=100, l=u, mu=0.53, sigma2=4.3^2) + { + print(c(u, l, mu)) # here, l is set to u?s value + u = u/sqrt(sigma2) + l = l/sqrt(sigma2) + mu = mu/sqrt(sigma2) + print(c(u, l, mu)) + } > > Su1() [1] 100.00 100.00 0.53 [1]
2020 Sep 20
2
sprintf, check number of parameters
Dear R developers, I am wondering if this should raise an error or a warning. > sprintf('%.f, %.f', 1, 2, 3) [1] "1, 2" I am aware that R has ?numbered? sprintf arguments (sprintf('%1$.f', ?), and in that case, omissing of specific arguments may be intended. But in the usual syntax, omission of an argument is probably a mistake. Thank you for your consideration.
2017 Sep 02
0
Strange lazy evaluation of default arguments
Dear Bill, All makes perfect sense (including the late evaluation). I actually discovered the problem by looking at old code which used your proposed solution. Still I find it strange (and, hnestly, I don?t like R?s behavior in this respect), and I am wondering why u is not being copied to L just before u is assigned a new value. Of course, this would require the R interpreter to track all these
2012 Feb 22
1
line width in legend of interaction.plot
Dear R developers, The following command produces an interaction plot with lwd=2. interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=2) In the legend, however, lwd seems to be 1, which does not seem to be intended behavior. Probably the lwd is not correctly forwarded to legend: from the interaction.plot source: legend(xleg, yleg, legend = ylabs, col = col, pch = if (type %in%
2012 Oct 09
1
ylim with only one value specified
Dear R developers, I would like to have R choose the limits of the y-axis semi-automatically, e.g., zero should be included, but the maximum should be chosen depending on the data. Examples: plot(1:10, 1:10) # selects min and max automatically plot(1:10, 1:10, ylim=c(1, 10)) # manual definition plot(1:10, 1:10, ylim=c(0, Inf)) # this would be a nice feature, i.e. lower y limit = 0 defined
2003 Sep 04
1
Looking for R Equivalent of Gauss Statements
Hi, I am translating some Gauss code to R. Gauss has an interesting way of handling constraints. Observe the following code snipplet: e1 = x[.,23] .eq 0; @ remove obs with Regular Hours = 0 @ e2 = x[.,12] .gt 1; @ remove obs with non-regular work status @ e3 = x[.,4] .lt 15; @ remove obs with agricultural and mining industry code (< 15)@ esum = e1 + e2 + e3; e = esum .gt 0; @
2011 Apr 14
3
Bad artifacts at 32kbps
I have been trying some different sample rate and bitrate combinations to get a feel for how CELT behaves. I then encoded it with a couple of different frame sizes and sample rates. There were some small differences, but nothing horrible. So, I decided to run with 24KHz sample rate with 16 bit samples. This seemed like a reasonable tradeoff against the quality degradation that my folks