So far I have done this to achieve the desired result:

```
# A tibble: 4 x 2
   frag treat
  <dbl> <dbl>
1     1     1
2     2     1
3     1     2
4     2     2

treat_1 <- tab_example %>% filter(treat == "1")
treat_2 <- tab_example %>% filter(treat == "2")

new_tab_example <- full_join(treat_1, treat_2, by = "frag")

> new_tab_example
# A tibble: 2 x 3
   frag treat.x treat.y
  <dbl>   <dbl>   <dbl>
1     1       1       2
2     2       1       2

```

Is there a way to do it in one step?