I have a data frame, for example:
name age
1 "Danny" 20
2 "Mitt" 35
3 "Dylan" 8
When I get new entry, I want to update this df
.
I have used nrow(df) + 1
for the next row:
df[nrow(df) + 1, ] <- c("Tom", 4)
Is there any other way to do this?