R_extra_terr was being returned as a list, causing problems when writing file. Now returns as a single number, so should be able to append as a vector to the data.frame