Displaying 20 results from an estimated 10000 matches similar to: "programing problem with for( )"
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]]
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
2009 Sep 30
3
programming to calculate variance
Dear R-user
Suppose I have the following data
y=c(2,1,5,8,11,3,1,7,50,21,33,7,60)
x=data.frame(y)
for(i in 4:nrow(x)) x[i,] =var(x[i-3:i-1,])
I'm trying to get a new variable with the variance of the 3 previous values
(just an example) and with NA in the three first positions. I know that my
for() is wrong
but I'm not able to find my error.
Any idea?
Thanks,
Marlene.
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
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
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]]
2011 Dec 01
0
Problemas al instalar R 2.14 en Ubuntu 11.10 - Resuelto!
Disculpen se me escapó el portugués.
2011/11/30 Carlos J. Gil Bellosta <cgb@datanalytics.com>
> El problema es que si tienes R instalado en tu $HOME, dependiendo de
> la variable de entorno $PATH, uno de los ejecutables se llama primero
> al llamar a R.
>
> Lo más natural sería eliminar R de $HOME ya que tienes instalada la
> versión actual "como Dios manda".
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:
2016 Apr 07
0
using apply to a data frame
??I would like to apply a function, fract, to the columns of a
dataframe. I tried the following
apply(data5NonEventEpochs,2,fract)
but, no surprise it did not work as apply works on matrices not data
frames. How can I apply a fuction to the columns of a data frame? (I
can't covert data5NonEventsEpochs to a matrix as it contains character
data).
Thank you,
John
John David Sorkin M.D., Ph.D.
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,
2002 May 29
2
Tcl/tk , question about the environment of the call
This is my simple code, my intention is to let the inner function browse the
objects in the outer function.
#######################
tk1 <- function() {
tk2 <- function() {
inner <- 3
list2 <- ls()
#list objects in fuction tk2
print("**** inner objects ****")
print(list2)
#list objects in fuction tk1
list_parent <- ls(parent.frame())
2009 Jun 23
9
Learning FXRuby please help!
Hi all,
I''m trying to get text on to the screen in response to pressing a
button. This code doesn''t work, and I don''t know why. My puts command
says that the window is shown, but it''s not displayed.
Also, it seems to me that there should be an easier way to get text on a
screen in response to pressing a button. Any hints? Thanks!
Marlene
require
2011 Jul 14
4
puppet custom fuction run as user pupprt?
I wrote a custom fuction to read a root read-only file, it raised an
Permission Denied error.
During debug, i found this fuction seems to run as user puppet, it is this
a feature or a bug?
--
System Administrator, Focus on System Management and Basic Development
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group,
2008 Jul 20
2
How to inform all the daemons I have modified the smb.conf file
Hello, everyone
I edit the lp_load() of the samba source that this fuction may modify the smb.conf sometimes. How can I let all the samba daemons know that?
Restarting samba service may cause all link break up.
Thanks!
From miguelmedalha at sapo.pt Sun Jul 20 06:29:09 2008
From: miguelmedalha at sapo.pt (Miguel Medalha)
Date: Sun Jul 20 06:29:42 2008
Subject: [Samba] How to
2018 Mar 02
0
release of SCperf 1.1.1 and bullwhipgame packages
Dear R users.
I'm pleased to announce the release of *SCperf* 1.1.1 and *bullwhipgame*
packages on CRAN.
The *SCperf* package implements functions for planning and managing
Inventories in a Supply Chain:
https://CRAN.R-project.org/package=SCperf
<https://cran.r-project.org/package=SCperf>
And the *bullwhipgame* is a shiny app demo of the bullwhip effect, the
increase in demand
2018 Mar 02
0
release of SCperf 1.1.1 and bullwhipgame packages
Dear R users.
I'm pleased to announce the release of *SCperf* 1.1.1 and *bullwhipgame*
packages on CRAN.
The *SCperf* package implements functions for planning and managing
Inventories in a Supply Chain:
https://CRAN.R-project.org/package=SCperf
<https://cran.r-project.org/package=SCperf>
And the *bullwhipgame* is a shiny app demo of the bullwhip effect, the
increase in demand
2006 Sep 28
2
get index of elements in vector
Hello all
Is There a fuction that return a index of a element in vector?
like this semantic example:
vector = c( 100, 200, 300 )
getINDEX( vector, value = 200 )
Thanks in advance for your attention.
Cleber Borges
2006 Jul 14
2
Negative Binomial: Simulation
Hi R-Users!
I fitted a negative binomial distribution to my count data using the
function glm.nb() and obtained the calculated parameters
theta (dispersion) and mu.
I would like to simulate values from this negative binomial distribution.
Looking at the function rnbinom() I was looking at the relationship
between the two possible parametrizations of the negative binomial and found
that for this
2009 Aug 21
2
multiple linear regression
Good morning,
I want to make a linear regression of a variable fuction of two variables y = a1 x1 + a2 x2 + c
I found the function lm (y ~ x) but it used for a simple linear regression, but for multiple regression i do not know which function do this!!
Can you help me please!!
Thank you in advance
[[alternative HTML version deleted]]
2009 Oct 13
3
cdf
Dear all,
I have the cdf of the following power fuction distribution:
F(y)=(y/350)^a ,0<y<350,
where " a " is some parameter with range a>0.
I want to use it as the argument of the discretize function of the actuar package.
So I think I need to define this function to R so that if I entered a=1, I get the following
F(y)=(y/350)
and if I entered a=4.5, I get the