I have 8 data frames that I want to add a column called \'park\', then fill this column in w/ a value that comes from the last four characters of the data
I would put the data.frames in a named list and perform this task:
rslt <- list(water_land_by_ownname_apis = water_land_by_ownname_apis,
water_land_by_ownname_indu = water_land_by_ownname_indu)
for (i in names(rslt)) {
col <- unlist(strsplit(i, "_"))[5]
rslt[[i]]$park <- col
}
do.call("rbind", rslt)