R: added a test case for graph.data.frame on matrices, #557.