title: How would I inverse the binary digits (0 and 1) of a matrix in R?
body: <p>I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?</p>