@mara was referring to a number of things about your code. You should prune down your example to just what is needed to show what you need to do... not whole table. Also you should show the input (reduced to just what is need to explain your problem) and the output you expect.
The reprex @mara referred you to should build the table... your updated question is not a reprex and just shows us the data in the input table, and doesn't show the output you expect.
Keep in mind that just about everyone in this community is using their own spare time to answer your question so you should do what you can to make it as easy a possible for this community to help you.
In any case here is a reprex of a pruned down example that builds your input data and shows how to use mutate to get the results it seems like you are looking for.
suppressPackageStartupMessages(library(tidyverse))
tbl <- tibble::tribble(
~num_dependents, ~own_telephone, ~foreign_worker,
1, "yes", "yes",
1, "none", "no",
2, "none", "yes")
tbl
#> # A tibble: 3 x 3
#> num_dependents own_telephone foreign_worker
#> <dbl> <chr> <chr>
#> 1 1.00 yes yes
#> 2 1.00 none no
#> 3 2.00 none yes
mutate(tbl,
own_telephone = if_else(own_telephone == "yes", 1L, 0L),
foreign_worker = if_else(foreign_worker == "yes", 1L , 0L))
#> # A tibble: 3 x 3
#> num_dependents own_telephone foreign_worker
#> <dbl> <int> <int>
#> 1 1.00 1 1
#> 2 1.00 0 0
#> 3 2.00 0 1
Created on 2018-03-04 by the reprex package (v0.2.0).