On 13-04-03 7:35 PM, Julio Sergio wrote:
I want to superimpose two functions plots in the same page. The functions L0
and L1, defined below
f0 <- function(mu, xm, ds, n) {
1 - pnorm((xm-mu)/(ds/sqrt(n)))
}
f1 <- function(mu,n) f0(mu, 386.8, 48, n)
L0 <- function(mu) f1(mu, 36)
plot(L0,ylim=c(0,1),xlim=c(360,420))
L1 <- function(mu) f1(mu,100)
lines(L1)
The plot of L0 works pretty well. However, when trying to plot the second
function, L1, the interpreter issues an error:
Error in as.double(y) :
cannot coerce type 'closure' to vector of type 'double'
How can I solve my problem, since I want to have both plots with the same
quality? I mean, I don't want to produce an approximating polygonal for the
second function.
curve(L1, add=TRUE) should handle it.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.