I have a matrix that looks lke this:
wun2 308.0 111.0 72.0 64.0
wupA 8177.0 3933.0 2235.0 2057.0
wus 5.0 0.0 9.0 5.0
x16 581.2 154.3 297.1 384.2
xmas-1 26.5 58.0 26.5 31.0
xmas-2 201.5 138.2 136.5 203.0
y 18.0 1.0 13.0 8.0
yar 5.0 0.0 0.0 2.0
yata 1283.0 679.0 735.0 784.0
yellow-b 129.0 82.0 103.0 96.0
yellow-c 817.3 415.0 832.0 788.0
zormin 3447.0 2005.0 1999.0 2300.0
zpg 1.5 0.0 0.0 0.0
zwilch 1.0 0.0 8.0 14.0
zye 83.0 64.0 17.0 30.8
I want to round that matrix, but I want all the numbers whose last decimal is 5 to be rounded up to the next integer. Therefore, I wanted to apply a the ceiling function to all cells that end in .(somenumber+)5 before doing a general round().
I don't know how to specify that as a shell expression to glob2rx so it will make the adequate regular expression, but I inferred it had to be something like this:
grx <- "^\\d+\\.\\d+5$"
However, this doesn't seem to be getting any of the cells when I do grep(grx, x=matrix.1, value=TRUE)
.
What could be wrong?
Thanks! Carmen