I am trying to use pmatch in base R. The following example appears to work as expected:
pmatch
R
treat1 <- c(1, 1, 1, 1, 1, 1, 1, 2, 2,