I don't think your explanation of the problem you are trying to solve is clear enough to give you an answer as is.
For example does that table have 8 columns in it? The data you have presented has only 3 columns.
What do you mean that a 1 in the input would read a1 etc.
You should show the input and output are looking for.
You should include a reprex, even if the code doesn't work.
Is this what you are trying to do?
suppressPackageStartupMessages(library(tidyverse))
# make a table
tbl <- tribble(
~id, ~x, ~y, ~z,
1L, "a1", "b1", "c1",
2L, "a2", "b2", "c2"
)
tbl
#> # A tibble: 2 x 4
#> id x y z
#> <int> <chr> <chr> <chr>
#> 1 1 a1 b1 c1
#> 2 2 a2 b2 c2
# select just the row for id == 1L
filter(tbl, id == 1L)
#> # A tibble: 1 x 4
#> id x y z
#> <int> <chr> <chr> <chr>
#> 1 1 a1 b1 c1