search for: trncint

Displaying 1 result from an estimated 1 matches for "trncint".

Did you mean: tracing
2010 Nov 13
1
truncate integers
Is there any really easy way to truncate integers with several consecutive digits without rounding and without converting from numeric to character (using strsplit, etc.)?? Something along these lines: e.g. = 456 truncfun(e.g., location=1) = 4 truncfun(e.g., location=1:2) = 45 truncfun(e.g., location=2:3) = 56 truncfun(e.g., location=3) = 6 It's one thing using floor(x/100) to get 4 or