I want to add additional rows to a dataframe using a loop. I have a list of API endpoints to cycle thru via a loop. Each iteration of the loop will deliver a single row of data. I can't get beyond how to get additional rows (i.e. i = 2 is row 2 of my df and so on) so that each iteration adds a row of data to the dashboard df. With what I've included below I'm getting a dashboard df that is 13 obs w/ 0 variables
dashboard <- data.frame()
for (i in 1:x){
node <- fromJSON(acct_hotspots_api_ep[i])
node <- as.data.frame(node)
other functions/commands.....
rewards <- merge(rewards, last24h)
rewards <- merge(rewards, last7)
rewards <- merge(rewards, last30)
rewards <- merge(rewards, last90)
dashboard[i,] <- rewards[1,]
}