Hello,
sorry if I am asking something obvious ![]()
The data frame:
df <- tribble(
~a, ~b, ~c, ~d,
"item1", 10, "item2", 20,
"item3", 30, "item4", 40
)
> df
# A tibble: 2 × 4
a b c d
<chr> <dbl> <chr> <dbl>
1 item1 10 item2 20
2 item3 30 item4 40
I want to grab columns c , d and put them at the bottom of data frame as new records, so the final df would look like this:
# A tibble: 4 × 2
a b
<chr> <dbl>
1 item1 10
2 item3 30
3 item2 20
4 item4 40
How to achieve this please, preferably in tidyverse way?