Thursday, 12 September 2013

Keep Integer Matrix in R as Integer Matrix

Keep Integer Matrix in R as Integer Matrix

Suppose that I have an integer matrix in R filled with "1".
When I divide it by two it will be converted to a double matrix.
How can I force R to not change the type matrix? (So the matrix will be
filled with 0 instead of .5).
It is true that I can use round function later, but it decrease the speed
significantly.

No comments:

Post a Comment