I have a 1 column table with postcodes in it: I would like to loop through each postcode using the postcode_lookup() function in the postcodeioR library. My current attempts are the following:
x <- data.frame()
for(i in 1:3){
x[i, ] <- postcode_lookup(table$Var1[i])
}
So i instantiated a new table and tried to add the result of postcode_lookup to a new row every time. But I get nothing. What i get is data frame with 3 obs. and 0 variables. the data should look like this: imagine 31 columns and multiple rows: table