On 23/10/2014, 11:35 PM, PO SU wrote:
> 
> Dear usRers,
>   Now i want to cal ,e.g. 
>  cal(1.234)  will get 3
>  cal(1) will get 0
>  cal(1.3045) will get 4
>  But the difficult part is cal(1.3450) will get 4 not 3.
> So, is there anyone happen to know the solution to this problem, or it can't 
> be solved in R, because 1.340 will always be transformed autolly to 1.34?
> 

No, there's no way to do what you want unless you put quotes around the
number.  R parses 1.345 and 1.3450 as exactly the same thing, whereas
"1.345" and "1.3450" are different.

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.

Reply via email to