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
Created on 2018-03-06 by the reprex package (v0.2.0).
For information on reprex see https://www.jessemaegan.com/post/so-you-ve-been-asked-to-make-a-reprex/
For now the version of reprex in CRAN has some issues so you should install reprex directly from github.
Until CRAN catches up with the latest version install reprex with
devtools::install_github("tidyverse/reprex")