Displaying 1 result from an estimated 1 matches for "densityfn".
Did you mean:
density
2003 Apr 16
2
trying to plot function using curve
...Faheem.
***********************************************************************
mg.hist <- function(len,theta,pos)
{
postscript(file="plot.ps", horizontal = FALSE, onefile = FALSE, paper
= "special", width=6, height=4)
densityfn <- function(x)
{
density(x,theta,pos,len)
}
curve(densityfn)
dev.off()
}
density <- function(x,theta,pos,len)
{
if((len !=2) && (len !=3))
stop("length must be 2 or 3")
if((pos < 1) || (pos > len))
stop("pos must be betwee...