Hi all, I have a function rho.f which gives a list of estimators. I have the following problems. rho.f(0.3) gives me the right answer. However, if I use rho.f(corr[4]) give me a different answer, even though corr[4]==0.3. This prevents me from using a for loop. Can someone give me some help? Thank you very much in advance. Hannah
> rho.f(0.3) $est.1 [1] 0 0 0 0 0 0 $est.2 [1] 0 0 0 0 0 0 $est.3 [1] 0 0 0 0 0 0 $est.4 [1] 0 0 0 0 0 0 $est.5 [1] 0 0 0 0 0 0 > corr <- seq(0,0.9, by=0.1) > corr[4] [1] 0.3 > rho.f(corr[4]) $est.1 [1] 0.0 0.0 2.5 0.0 5.0 0.0 $est.2 [1] 0.00000 0.00000 0.00000 0.00000 3.72678 0.00000 $est.3 [1] 0.000000 0.000000 0.000000 0.000000 2.777778 0.000000 $est.4 [1] 0.00000 0.00000 0.00000 0.00000 13.88889 0.00000 $est.5 [1] 0.00000 0.00000 0.00000 0.00000 13.88889 0.00000 > [[alternative HTML version deleted]] ______________________________________________ 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.