Hi there,
How can I plot a function in R which is defined by conditional branches?, e.g.:
u(x) = 1, Ed<x<2Ed (where Ed is a positive constant, say, 25); u(x)=0.5*x, x>2Ed
curve(u(x), ....)
So far I have had to use curve(..., add=TRUE) with two function define by segments, i.e., two branches or intervals for the variable x, say, 25,50 and then from 50,... and I would appreciate a more elegant solution if possible.
Thanks a lot,
Pedro Rodrigues de Almeida Helsinki - Finland
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html