I am trying to update a tibble using for loop without any success. Below is my code:-
temp <- tibble(field1="",field2="")
for (i in 1:2){
for (k in 1:2){
add_row(temp,field1=i,field2=k)
}}
temp
# A tibble: 1 x 2
field1 field2
<chr> <chr>
1 "" ""
Can you please guide me why this is the case?