I have a matrix as like this
structure(c("cat", "Dog", "Dog1", "Cow", "E02.3", "E06.7", "E01.9", "E01.0", "Twe.03", "Twl.06", "Twl.15", "Twl.00", "CA/DO", "CA", "DO", "CA"), .Dim = c(4L, 4L), .Dimnames = list(NULL, c("Name", "Id1", "Id2", "Type")))
I need to split as two array, only the Id1 values based on the Type column value as like this
CA
E02.3
E06.7
E01.0
DO
E02.3
E01.9
CA/DO values indicating the common names.