Hi,

I am a bit surprised how approx resolves ties when ties = 'ordered'. In the
following two examples I'd expect the first expression to return 1 (not 2).

The documentation reads that "that 'f=0' is right-continuous and 'f=1' is
left-continuous" so one would expect  the argument to matter when resolving 
ties.

Thanks,
Vadim

->  approx(c(1,1), seq(2), 1, method = "const", rule = 2, f = 1, yleft = NA, 
ties
= "ordered")$y
[1] 2
->  approx(c(1,1), seq(2), 1, method = "const", rule = 2, f = 0, yleft = NA, 
ties
= "ordered")$y
[1] 2


-> version
               _                           
platform       i486-pc-linux-gnu           
arch           i486                        
os             linux-gnu                   
system         i486, linux-gnu             
status                                     
major          2                           
minor          4.1                         
year           2006                        
month          12                          
day            18                          
svn rev        40228                       
language       R                           
version.string R version 2.4.1 (2006-12-18)

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to