Is there a way to identify (for subsequent replacement) which rows in a
matrix are comprised entirely of *integers*?  I have a large set of
*nx3 *matrices
where each row either consists of a set of 3 integers or a set of 3 real
numbers.  A given matrix might looks something like this:

           [ ,1]               [ ,2]               [ ,3]

[1, ]     121.0000        -98.0000       276.0000

[2, ]      10.1234         25.4573         -188.9204

[3, ]      121.0000        -98.0000       276.0000

[4, ]      -214.4982       -99.1043        -312.0495

.....

[n, ]      99.0000          1.0000           -222.0000

Ultimately, I'm going to replace the values in the integer-only rows with
"NAs."  But first I need r to recognize the integer-only rows.  I assume
whatever function I write will be keyed off of the ".0000s", but have no
clue how to write that function.  Any ideas?

David Katz

        [[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.

Reply via email to