On Sep 20, 2009, at 10:59 AM, manta wrote:
Good afternoon,
I know it is a simple question but I cannot figure out how to solve
this
issue.
I have a function that calculate two objects. I would like to choose
everytime about the tree object, with default to not show it.
I cannot understand that. Perhaps you can try again to tell us what
you want to do with tree?
OP<-function(S=100,X,sigma,mu=0,r=0,time=1,n)
{
value=(S)
......
tree = matrix(rev(tree), byrow = FALSE, ncol = n + 1)
... where did tree first get defined?
return(value[1])
... do you really want to return only value[1] _and_not_ tree? If you
exit the function this way, tree will get lost.
}
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
______________________________________________
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.