I have a mid-sized data frame with two busted rows. The addresses are bad, so geocode()
didn't geocode them and so I don't have lat/long info for either.
I tried making a temp frame to play with:
tmp.frame <- subset(all.sites, is.na(all.sites$lat))
I can update values in tmp.frame
with tmp.frame$Address <- c("Better Address 1","Better Addresss 2")
but I can't seem to edit the value in the larger frame. all.sites[392, 7]
is one of the spots with missing lat/lon and I thought that all.sites[392, 7] = c("Better Addy")
would do the trick, but instead I'm getting this:
Warning message:
In `[<-.factor`(`*tmp*`, iseq, value = "Better Addy") :
invalid factor level, NA generated
Curiously, tmp.frame[2,4] = c("Better")
works just fine. So I'm not sure what the difference between the two is.
Note: when I try vi(all.sites[392,7])
I get this, roughly:
structure(NA_integer_, .Label = c("10003 39th Avenue",..., class = "factor")