search for: cdist

Displaying 4 results from an estimated 4 matches for "cdist".

Did you mean: dist
2011 May 02
0
Puppet bootstrap: via cdist
Good morning puppets, as stated for reallife, "one always meets more than one time", this is true for puppet and me: Although I''m migrating away from puppet [0] to cdist [1], a customer requests a new puppet installation. This brings me again to the question on how to bootstrap a new puppet infrastructure, which we did with a shell script or a Debian package and then running puppet against a manifest to bootstrap itself. The first approach is rather lightweight c...
2010 Feb 05
1
Incompatible types error
...Eztx[i] } fx[i]<-function(mea,rand,prob,Et){ rand[i]<-runif[i](1,-50,50) mea=0 prob[i]<-function(pi,rand,Et,mea){ (1/(2*pi*rand[i]))*exp((-(Et[i](Eztx[i],t,A,n))-mea)^2)/(2*(rand[i]^2)) } prob(pi,rand[i],Et[i](Eztx[i],t,A,n),mea) } Tx[i]<-function(fx,cdist){ cdist[i] <-(1-((pnorm(Et[i](Eztx[i],t,A,n),mea,rand[i],)) -(pnorm(mea,mea,rand[i],)))) Tzx[i]<-fx[i](prob[i],rand[i],Et[i])*cdist[i] Tzx[i] } } Fitness[i]<-function(Tx){ f[i]<-Tx[i] Fit[i]<-sum(f[i]) } } plot(Fit,rand) " -- View this message in c...
2005 Nov 15
1
An optim() mystery.
...qrt(.Machine$double.eps) big <- sqrt(.Machine$double.xmax) k <- pars[1] rho <- pars[2] # This line is needed in the Nelder-Mead case: if(k < 0 | rho < 0 | rho > 1) return(big) Sigma <- k*rho^outer(theta,theta,cdist) udv <- svd(Sigma) d <- udv$d if(min(d) < eps) return(big) w <- t(udv$u)%*%res # Minus twice the log likelihood: sum(log(d)) + sum(w^2/d) } cdist <- function(theta1,theta2) { d &l...
2009 Oct 13
2
General means of matching a color specification to an official R color name
Hello List Dwellers: I?ve looked around quite a bit, but don?t quite see an answer that I understand. I?m looking for a way to take any kind of color specification (rgb, hsv, hcl, hex) and match it to the n-nearest R official color names. Clearly it is easy to interconvert different specification schemes and color spaces, but matching to the name seems a bit trickier. Seems like if one has a