Skip to content

Instantly share code, notes, and snippets.

@bselden
Last active February 2, 2016 16:50
Show Gist options
  • Save bselden/cc86c0e9e219b8cd4ffc to your computer and use it in GitHub Desktop.
Save bselden/cc86c0e9e219b8cd4ffc to your computer and use it in GitHub Desktop.
clean.newf[is.na(lat) & !is.na(lat.start)] #23609 rows
clean.newf[is.na(lat.start)] #16 rows
clean.newf[is.na(lat.end)] #23624 rows
### Assign those with NA for lat, to the lat start, same with lon
clean.newf$lat <- ifelse(is.na(clean.newf$lat), clean.newf$lat.start, clean.newf$lat)
clean.newf$lon <- ifelse(is.na(clean.newf$lon), clean.newf$lon.start, clean.newf$lon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment