Re: [R] Error, Variable is missing

2012-04-02 Thread Guaramy
Thanks Michael , its works perfectly now. -- View this message in context: http://r.789695.n4.nabble.com/Error-Variable-is-missing-tp4515418p4526683.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list http

Re: [R] Error, Variable is missing

2012-03-29 Thread R. Michael Weylandt
I believe you need to actually pass the values to your function: pdf(x, mu, sigma, alpha, beta, rho) # Works pdf(x) # Doesn't. If not, please show us how you are calling pdf(). Michael On Thu, Mar 29, 2012 at 9:25 AM, Guaramy wrote: > Hi, I am writing a function to plot a pdf of a distribution

[R] Error, Variable is Missing

2012-03-29 Thread Guaramy
Hi, I am writing a function to plot a pdf of a distribution, GNL.pdf.fn = function(x,mu,sigma,alpha,beta,rho) { y = x-rho*mu cf.fn = function(s){ cplex = complex(1,0,1) temp1 = alpha*beta*exp(-sigma*s^2/2) temp2 = (alpha-cplex*

[R] Error, Variable is missing

2012-03-29 Thread Guaramy
Hi, I am writing a function to plot a pdf of a distribution x=seq(-4,4,length=200) mu = 0 sigma = 0.01 alpha = 17.5 beta = 17.5 rho = 0.1 GNL.pdf.fn = function(x,mu,sigma,alpha,beta,rho) { y = x-rho*mu cf.fn = function(s){ cplex = complex(1,0,1)